🎨 Color Converter

Convert colors between HEX, RGB, HSL, CMYK, and HSV formats

✓ Free Forever · ✓ No Signup · ✓ No Upload · ✓ Works Offline

🔒 Your data never leaves your device. All processing happens locally in your browser using JavaScript color math. No upload, no server, no tracking.

Features

  • 5 Color Formats — Convert between HEX, RGB, HSL, CMYK and HSV, and get OKLCH for CSS. Paste oklch(), oklab(), lab(), lch(), hwb() or display-p3 and they are converted too.
  • Live Preview — See a visual preview of the color as you enter or adjust values.
  • CSS Named Colors — Browse and convert all 148 CSS named colors.
  • Copy Any Format — Copy the color value in any format with one click.

How It Works

  1. Enter a color — Type a HEX code or RGB / HSL values, paste any CSS color (oklch() and lab() included), or pick a CSS named color.
  2. See all formats — All 5 color representations update simultaneously.
  3. Copy what you need — Click any format to copy it for use in code or design tools.

Use Cases

  • Convert HEX colors to RGB or HSL for CSS
  • Get CMYK values for print design
  • Explore CSS named colors and their values

Frequently Asked Questions

How accurate is the CMYK conversion?

The conversion uses a standard mathematical formula. For professional print work, use a color-managed workflow with ICC profiles.

Can I enter colors in any format?

Yes. Type HEX (3, 4, 6 or 8 digits), RGB, HSL, HSV or CMYK values, or paste any CSS color: rgb(), hsl(), hwb(), oklch(), oklab(), lab(), lch(), color(srgb …) / color(display-p3 …) or one of the 148 names — every other format updates at once. The output includes an OKLCH value, the format Tailwind CSS 4 uses.

Does it keep transparency (alpha)?

Yes. A color with transparency — #4285f480, rgba(), hsla(), or "/ 50%" in any CSS color — keeps it: HEX comes out with 8 digits, RGB and HSL as rgba() / hsla(), OKLCH with "/ 0.5". You can also set it in the Alpha box. CMYK and HSV have no transparency, so those show the solid color.

What happens to a color outside sRGB?

oklch(), lab() and display-p3 can describe colors no HEX or RGB value can hold. Those are brought into sRGB the way CSS Color 4 does it: lightness and hue stay, saturation is lowered until the color fits. The page says when that happened, so you know the HEX is the nearest match, not the same color.

Can it check contrast for accessibility?

Yes. The Contrast check card gives the WCAG 2 contrast ratio of this color against another one (white, black or any color you paste), as text or as the background, and whether it passes AA and AAA for normal and large text and the 3:1 for icons and form borders. The ratio is cut, not rounded, so 4.499 shows as 4.49 and fails, as WCAG intends. When it fails, the page offers the closest color that passes: same hue, only the lightness moved. A see-through text color is blended onto the background first. It checks WCAG 2 only, not the draft APCA method.

Notes from Milo 🐨

2026-11-26

Picking a colour usually ends with one question: will text on it be readable? There's now a Contrast check card for that. It gives the WCAG contrast ratio of your colour against white, black or any colour you paste, with this colour as the text or as the background, and ticks off AA and AAA for normal and large text plus the 3:1 for icons and form borders. The number is cut, not rounded, so a 4.499 doesn't sneak through as a pass. If it fails, it offers the nearest colour that passes (same hue, only lighter or darker), and one click uses it. Smaller things too: copying a harmony swatch now puts THAT colour in Recent colors (it put the colour you started from), the paste box takes "66, 133, 244", 0x4285f4 and a whole line like background: #4285f4;, and a decimal typed into the H/S/L boxes is rounded instead of being ignored while the box still showed it.

2026-10-28

Two things this page quietly threw away. Transparency: paste rgba(255, 0, 0, 0.5) and every result came back solid, and the HEX box cut #4285f480 down to #4285f4 — while the Chinese FAQ said 8-digit HEX and RGBA worked. Now the alpha stays: HEX comes out with 8 digits, RGB and HSL as rgba() / hsla(), and there's an Alpha box if you want to set it by hand (CMYK and HSV have no transparency, and the page says so). And modern CSS: Tailwind 4 writes its whole palette as oklch(), and this page answered "I can't read that". It now reads oklch(), oklab(), lab(), lch(), hwb() and color(display-p3 …), checked against Chrome's own colour engine, and gives you an OKLCH line to copy. Some of those colours don't fit in HEX at all — when that happens it says so and shows the closest one, the way CSS itself does it.

2026-10-02

I opened this page on my phone and half of it was missing: the right column ran off the screen, and a few labels showed raw code names instead of words. Worse, the page promised CSS named colors and had none. So: it's one column on a phone now, every label is a real word, and there's a box that takes whatever you paste — #ff6347, rgb(255 99 71), hsl(), hsv(), cmyk() or just "tomato". It tells you the color's CSS name, or the closest one, and you can browse all 148. Two quieter fixes: typing a hue into a grey no longer gets thrown away (set H to 200 on grey, then raise S — you used to get red), and a typo like #12345g is flagged instead of quietly becoming a different color.

Related Tools

💬 Bug, idea, or just to say hi? Tell Milo 🐨 · [email protected]