HSL To HSV
How This Converter Works
Converts HSL hue, saturation, and lightness to HSV hue, saturation, and value, rounding output percentages to whole numbers.
Formula or rule
Normalize S and L to [0,1]; V=L+S×min(L,1-L), and HSV saturation is 0 when V=0 or 2×(1-L/V) otherwise. Hue is unchanged.
Example
- Input
- H=120°, S=50%, L=50%
- Calculation
- V=0.5+0.5×0.5=0.75; HSV S=2×(1-0.5/0.75)=0.667; round hue and percentages to whole numbers.
- Result
- hsv(120, 67%, 75%)