MathematicsHSV and HSLOn this pageHSV and HSLHue, Saturation, Value ⇄ Hue, Saturation, LightnessHSV to HSLL=V⋅1−S2 S={0 if L=0 or L=1V−Lmin(L,1−L) otherwise \begin{align*} L &= V \cdot \frac{1 - S}{2} \:\\ S &= \begin{cases} 0 & \text{ if } L = 0 \text{ or } L = 1 \\ \frac{V-L}{min(L,1-L)} & \text{ otherwise } \end{cases} \\ \end{align*}LS=V⋅21−S={0min(L,1−L)V−L if L=0 or L=1 otherwise HSL to HSVV=L⋅S⋅min(L,1−L) S={0 if V=02⋅(1−LV) otherwise \begin{align*} V &= L \cdot S \cdot min(L, 1-L) \\ \:\\ S &= \begin{cases} 0 & \text{ if } V=0 \\ 2 \cdot (1 - \frac{L}{V}) & \text{ otherwise } \end{cases} \\ \end{align*}VS=L⋅S⋅min(L,1−L)={02⋅(1−VL) if V=0 otherwise