Hmm, I'm having trouble with this logic.

Let's assume the color is fully opaque white.  All components are therefore 1.0.

The goal state is palette entry 15 (which is the 16th palette entry, of course.)  The above code will generate 0.062256 or so, which is pretty much 16.  But since `vec2(0.0, 0.0)` is a valid coordinate, won't that pick entry 16 (the 17th?)

Maybe it needs a floor() at some stage...

-[Unknown]