How do I mathematically compute the values for HSL main colors?
I can hardcode them in the program, of course, but I remain interested how can I determine if the color is main or combined. There must be an inscribed hexagon in the HSL color circle, so I need angles on which its corners lay.
Asked
Active
Viewed 1,017 times
0

Tomáš Zato
- 50,171
- 52
- 268
- 778
-
Wikipedia, who's always your friend, has a nice treatment including the mathematics [here](http://en.wikipedia.org/wiki/HSL_and_HSV). – radical7 Feb 26 '13 at 16:52
-
I'll make sure to read the topic more carefully, but, since I have linked to the wikipedia myself, you could assume my knowledge about the page and, at least, post the `url#something` link to the right section. – Tomáš Zato Feb 26 '13 at 16:55
-
1Sure, example values of popular colors are at http://en.wikipedia.org/wiki/HSL_and_HSV#Examples, and the derivation of how to do the computation at http://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation, although it may be too wordy for what you're looking for. – radical7 Feb 26 '13 at 17:03