HSL to RGB conversion
I have some problems understanding the formulas for conversion from HSL to RGB color model.
Let's take for example H = 60 degrees, S = 0.7. L = 0.5.
And we start with C, which is 1 - | 1 - 1 | x 0.7 = 0.7 (if x means to multiply them, does it mean to multiply?)
Then H' is 1.
And now how to find X?
X is C( 1 - 1 ) isn't it? But what means C( of something) :SThen we find m = 0.5 - 0.35 = 0.15.
Can someone continue my example and tell if the steps so far are correct and especially how to find X. Thank you very much in advance! :)
$\endgroup$ 21 Answer
$\begingroup$Your steps so far are correct, and the $\times$ means multiplication.
By $X = C(1-|H'\text{ mod }2 - 1|)$, they mean $X = C\times(1-|H'\text{ mod }2 - 1|)$. A common convention in mathematics is to leave out multiplication signs when no confusion can arise (and apparently, also when it can).
This leads to $$ X = 0.7\times(1-|1-1|) = 0.7 $$ and thus to $(R_1,G_1,B_1) = (0.7,0.7,0)$. Then $(R,G,B) = (0.85,0.85,0.15)$.
$\endgroup$ 3