RGB to HSL (lossless)
- Input
- rgb(21, 216, 200)
- Expected output
- hsl(175, 82%, 46%)
Converting hsl(175, 82%, 46%) back to RGB returns rgb(21, 216, 200) again, bit for bit identical: this is a coordinate conversion, not a data conversion.
color space conversion
Not every color space describes the same thing: RGB and HSL are the same space seen from two angles, the conversion between them is reversible with no loss, while CMYK describes physical ink and LAB describes human perception, and those two conversions carry built-in approximation.
Converting hsl(175, 82%, 46%) back to RGB returns rgb(21, 216, 200) again, bit for bit identical: this is a coordinate conversion, not a data conversion.
Converting cmyk(90%, 0%, 7%, 15%) back to RGB with the same formula returns rgb(22, 217, 202), not rgb(21, 216, 200): the round trip does not close, off by 1 unit per channel, accumulated rounding from a formula with no profile calibration.
L=78.13 measures lightness (0 to 100), a negative a=-46.39 pulls toward green, a slightly negative b=-4.44 pulls toward blue; the a/b axes have no fixed bound, unlike RGB.
Yes. The idea is to show equivalent representations of the same color in different notations, making it easier to use the value across CSS, design systems, visual documentation and design-to-code workflows. You type in one format and get all the others synchronized at once, including HSV, CMYK, LAB and XYZ.
No, they represent the same color with different coordinates: RGB uses three additive light channels, HSL uses hue, saturation and lightness over the same color space. The conversion between them is exact trigonometry, reversible with no loss in either direction.
Because without a specific ICC profile for the printer and paper, every program applies its own mathematical approximation from RGB to CMYK, and none of them is "the" correct conversion, all are estimates until a real profile calibrates the result to the physical ink.
For on-screen use or as an approximate reference, no; the formula k = 1 - max(R,G,B) works without a profile. But for professional printing where the final color matters, an ICC profile for the specific paper and printer is the only way to make the conversion match the physical result.
LAB separates lightness (L) from color (the a and b axes) in a way that approximates human perception, which is why it is used to measure the difference between two colors more reliably than comparing raw RGB values, useful for print quality control and design tools aiming for visual consistency.
#0ea5e9#0ea5e9ffrgb(14, 165, 233)rgba(14, 165, 233, 1)hsl(199, 89%, 48%)hsla(199, 89%, 48%, 1)hsv(199, 94%, 91%)hsva(199, 94%, 91%, 1)cmyk(94%, 29%, 0%, 9%)lab(64.07, -11.09, -43.86)xyz(28.338, 32.883, 81.928)Conversion is purely mathematical and local. Nothing is sent to any server.