Color Converter: HEX, RGB, HSL, CMYK

Convert any color between HEX, RGB, HSL, HSV and CMYK.

Enter HEX, rgb(), hsl() or a CSS color name.

Contrast (WCAG 2.1)

🔒 Runs entirely in your browser. Nothing you enter is uploaded or stored.

What is the Color Converter?

The same color can be written in many ways. Web developers use HEX (#4F46E5) and RGB. Designers often think in HSL or HSV/HSB, where hue, saturation and lightness are separate and easy to adjust. Print uses CMYK ink percentages. This color converter turns any of them into all the others instantly.

You can type a HEX code (3, 6 or 8 digits), rgb(), hsl() or a CSS color name like rebeccapurple, or use the color picker. The tool also checks the WCAG 2.1 contrast ratio of white and black text on your color, so you can see at a glance whether it is accessible for buttons and backgrounds. AA needs 4.5:1 for normal text; AAA needs 7:1.

How to use the Color Converter

  1. Type a color in any format or click the swatch to pick one.
  2. Copy the HEX, RGB, HSL, HSV or CMYK value you need.
  3. Check the contrast boxes to decide whether white or black text is readable on this color.

Frequently asked questions

What is the difference between HSL and HSV?

Both describe hue and saturation. In HSL, lightness 100% is always white. In HSV (also called HSB), value 100% is the brightest version of the color. Photoshop and Figma color pickers use HSV/HSB; CSS uses HSL.

Is the CMYK value exact for printing?

No. It is a mathematical conversion. Real print colors depend on the ink, paper and color profile, so use your printer's ICC profile for professional print work.

What contrast ratio do I need for accessibility?

WCAG 2.1 level AA needs at least 4.5:1 for normal text and 3:1 for large text (about 24px, or 19px bold). Level AAA needs 7:1 and 4.5:1.