Page 1 of 1

Online tool for choosing colours

Posted: Thu Mar 16, 2017 3:50 pm
by Blue
Sorry, but no code for this particular tip.

Just an external helpful link : https://galactic.ink/sphere/

If, like me, you find it difficult to choose and harmonize colours, you'll love this online colour tool.

Image
With the mouse, you move, as a group, the small numbered spheres around the large one, harmonizing automatically and on the fly around the colour under the mouse pointer.

You can see immediately whether a given colour scheme is pleasant and matches your expectations. Most importantly, you measure, at a glance, the impact your color choices will have on your masterpiece application.

For colour-dumb programmers (like me!), priceless ! It is the most helpful and flexible colour tool i've ever come across.
If you find it useful, let me know.


PS (to the moderator) : if my message has been posted in the wrong section, please let me know and move it to the correct one.

Re: Online tool for choosing colours

Posted: Thu Mar 16, 2017 9:22 pm
by Keya
i just had a quick peek at its javascript and noticed this interesting little snippet:

Code: Select all

// apply saturation using sRGB D65 Whitepoint
var n = 1 - config.hsl.S / 100;
var lum = ((rgb.R * 0.212656) + (rgb.G * 0.715158) + (rgb.B * 0.072186)) * n;
rgb.R = rgb.R * (1 - n) + lum;
rgb.G = rgb.G * (1 - n) + lum;
rgb.B = rgb.B * (1 - n) + lum;
forgive my colornewbiness but does anyone know if this all that's required to convert RGB values to sRGB?

Re: Online tool for choosing colours

Posted: Thu Mar 16, 2017 9:29 pm
by Blue
Keya wrote:[...]forgive my colornewbiness[...]
'colornewbiness' :shock:
Sorry, Keya; I don't have an answer to your question.
But i just had to congratulate you on your creativity with words. Impressive.

Re: Online tool for choosing colours

Posted: Thu Mar 16, 2017 10:20 pm
by JHPJHP
Hi Keya, Blue,

It looks correct; the chromaticity numbers are frequently used in Color Space conversions:
- Procedure ConvertXYZ
- Procedure ConvertHunterLAB
- Procedure ConvertCIELAB
- Procedure ConvertCIELUV

Using PureBasic would require a little more work: n = 1 - config.hsl.S / 100
- Procedure ConvertHLS

NB*: The above Procedures can be found in Spider Web Drawing, demoed from the Context Menu.

Re: Online tool for choosing colours

Posted: Thu Mar 16, 2017 10:46 pm
by Keya
groovy functions JHP²! so it seems it's RGB -> HSL -> sRGB