Bringing a print palette to the web is easier in HSL: once your ink mix is expressed as hue, saturation and lightness, you can build hover states, tints and shades from it in seconds.
How CMYK to HSL conversion works
- Convert the CMYK percentages to RGB channels between 0 and 255.
- Divide the channels by 255 and take their maximum and minimum.
- The average of maximum and minimum is the lightness L, their spread drives the saturation S.
- The channel holding the maximum determines the hue H in degrees on the color wheel.
Worked example
The CMYK to RGB step is already an approximation and HSL values are rounded to whole numbers. The result is a very close match, not a color-managed conversion.
CMYK and HSL explained
What is CMYK?
CMYK is the four-ink model used in printing: cyan, magenta, yellow and key (black), each as a percentage from 0 to 100. Ink subtracts light instead of emitting it, so CMYK covers fewer colors than a screen — which is why bright screen colors often look duller once they are printed.
- Syntax:
- cmyk(C%, M%, Y%, K%)
- Range:
- 0–100% per ink
- Best for:
- print, packaging, press-ready artwork
What is HSL?
HSL splits a color into hue (0–360° on the color wheel), saturation (how colorful, 0–100%) and lightness (how bright, 0–100%). Because each part matches the way people describe color, HSL is the easiest format for building tints, shades and consistent palettes — by hand or in code.
- Syntax:
- hsl(H, S%, L%)
- Range:
- 0–360°, 0–100%, 0–100%
- Best for:
- palettes, tints and shades, theming
CMYK to HSL reference table
The most common CSS colors, converted from CMYK to HSL.
| Color | CMYK | HSL |
|---|---|---|
| black | cmyk(0%, 0%, 0%, 100%) | hsl(0, 0%, 0%) |
| white | cmyk(0%, 0%, 0%, 0%) | hsl(0, 0%, 100%) |
| red | cmyk(0%, 100%, 100%, 0%) | hsl(0, 100%, 50%) |
| lime | cmyk(100%, 0%, 100%, 0%) | hsl(120, 100%, 50%) |
| blue | cmyk(100%, 100%, 0%, 0%) | hsl(240, 100%, 50%) |
| yellow | cmyk(0%, 0%, 100%, 0%) | hsl(60, 100%, 50%) |
| orange | cmyk(0%, 35%, 100%, 0%) | hsl(39, 100%, 50%) |
| teal | cmyk(100%, 0%, 0%, 50%) | hsl(180, 100%, 25%) |
| purple | cmyk(0%, 100%, 0%, 50%) | hsl(300, 100%, 25%) |
| gray | cmyk(0%, 0%, 0%, 50%) | hsl(0, 0%, 50%) |