Developer tool

Color Converter: HEX, RGB, HSL & CMYK

This color converter turns any HEX, RGB, HSL, HSV, CMYK or CSS color name into every other format instantly, with WCAG contrast checks and tints and shades — free, private and offline.

100% free No upload — runs on your device Works offline
HEX, RGB, HSL, HSV, CMYK or a CSS color name

Contrast ratio (WCAG 2.x)

Shades & tints

How to convert a color code

  1. Type or paste a color in any format, or use the color picker.
  2. See the swatch update and read the HEX, RGB, HSL, HSV and CMYK values.
  3. Copy the format you need and check the contrast badges or pick a tint or shade.

What is a color converter?

A color converter translates one color notation into others. HEX and RGB describe the red, green and blue channels (0–255 each, 16.7 million combinations). HSL and HSV describe hue (0–360°), saturation and lightness or value, which are easier to adjust by hand. CMYK describes cyan, magenta, yellow and black ink percentages for print.

This tool also calculates the WCAG 2.x contrast ratio of your color against white and black using relative luminance, from 1:1 to 21:1, and marks AA and AAA passes. It finds the nearest of the 148 CSS named colors and builds a strip of five shades and five tints.

Everything is computed locally in your browser. Nothing is uploaded and the converter works offline once loaded.

Frequently asked questions

Which color formats can I enter?

You can type HEX (#rgb, #rrggbb or #rrggbbaa), rgb() or rgba(), hsl() or hsla(), hsv(), cmyk(), plain r, g, b numbers, or any of the 148 CSS named colors such as tomato or rebeccapurple.

How do I convert HEX to RGB?

Split the six-digit HEX code into three pairs and convert each pair from base 16 to base 10. For example, #ff6600 becomes rgb(255, 102, 0). The converter does this instantly as you type.

What contrast ratio do I need for accessible text?

WCAG 2.x requires at least 4.5:1 for normal text and 3:1 for large text to pass AA, and 7:1 for normal text and 4.5:1 for large text to pass AAA.

Why is the CMYK value only approximate?

Screen colors are RGB, and the tool uses the standard device-independent RGB to CMYK formula. Real print output depends on the printer's ICC color profile, so check proofs for critical print work.

What are tints and shades?

A tint is a color mixed with white and a shade is a color mixed with black. The strip shows five shades and five tints of your color; click any of them to convert it.

Is my data sent anywhere?

No. All color parsing and conversion happens in JavaScript in your browser, and the tool keeps working offline.

Related tools