Color Code Converter

Convert between HEX, RGB, HSL, HSV and CMYK instantly. Copy CSS-ready values with one click.

5 color formatsCSS-ready outputInstant conversion

① Enter a HEX color or use the picker ② Get RGB, HSL, HSV and more ③ Click any value to copy

5 Formats
HEX, RGB, HSL, HSV, CMYK — all CSS-relevant formats
CSS Ready
Copy values directly into your CSS stylesheets
Instant
Real-time conversion as you type

Color Code Formats Explained

HEX (#rrggbb) is the most common web format. RGB (0–255 per channel) is used in CSS color() and rgba(). HSL (hue 0–360°, saturation, lightness) is intuitive for adjustments. HSV (hue, saturation, value) is used in design tools like Figma and Photoshop. CMYK (cyan, magenta, yellow, key/black) is used in print production.

Frequently Asked Questions

HEX encodes the same RGB values in hexadecimal notation. #ff0000 is the same as rgb(255, 0, 0). HEX is more compact and common in CSS, while RGB makes the component values more readable.
Both use hue and saturation. HSL (Lightness) has pure white at L=100% and pure black at L=0%. HSV (Value) has the fully saturated hue at V=100% and black at V=0%. HSL maps more intuitively to human perception.
CMYK is a subtractive color model used in 4-color printing (cyan, magenta, yellow, black). Screens use RGB (additive), so conversions between RGB and CMYK are approximate and depend on the color profile.
Yes. CSS uses hsl(hue, saturation%, lightness%). Hue is 0–360°, saturation and lightness are 0–100%. This tool outputs values compatible with CSS hsl().
The conversion from RGB to CMYK is a mathematical approximation. True print-accurate CMYK requires ICC color profiles and professional software. This tool gives a good approximation for screen-to-print estimation.
This tool converts from HEX to all other formats. To convert from RGB/HSL/CMYK to HEX, enter the HEX equivalent of your color. Most design tools display HEX alongside other formats.
Standard 6-digit HEX supports 16,777,216 colors (256³). With 8-digit HEX (including alpha), that extends to 4,294,967,296 values.

Explore Our Network