Colour Picker Added Hex and Float Conversions

Colour picker hex and float entry.
Colour picker hex and float entry.

The colour pickers I see never have conversions from RGB uint8_t 255, 255, 255 to RGB float (1.0f, 1.0f, 1.0f), so I added it to mine.
HSL, HSV and YUV are also shown.
There is one bug when typing in a text colour if no single RGB component dominates then the colour palette look up fails, picking full white.
It’s in JavaScript, so as usual I am surprised by how quickly and relatively easy this was to implement. The biggest issues I had were not knowing how JavaScript converts strings to and from numbers.

Try It

Colour Picker Released

Colour Picker in action

I created a colour picker in JavaScript, then I created 3 variations that simulate the common colour blindnesses. They are all linked so that when you select a colour in one it picks the “same” colour in the others. I mainly just created it out of interest. I realise there are similar colour blind simulator tools, but I hadn’t seen any that used linked colour pickers like this.

I don’t normally use JavaScript, but I had fun doing this. The syntax is easy to read and relatively sane. The rapid development is great and the HTML5 features such as canvas are easy to use and quite powerful.

Try it