Color Converter
Type or paste any colour value and get HEX, RGB, HSL, HSV, CMYK and OKLCH at once, with WCAG text contrast.
✓ Local processing · No uploads · No signup
Accepts #RGB / #RRGGBB / #RRGGBBAA, rgb(), hsl(), hsv(), cmyk(), oklch(), or 148 CSS colour names such as coral and steelblue; commas or spaces both work
- HEX
- —
- HEX8
- —
- RGB
- —
- RGBA
- —
- HSL
- —
- HSV
- —
- CMYK
- — approx.
- OKLCH
- —
Text contrast (WCAG)
Using this colour as the backgroundReal-world uses
- A printer hands you cmyk(76%, 47%, 0%, 4%): paste it to get #3B82F6 and rgb(59, 130, 246) for your CSS. The reverse works too when filling a prepress form from a design file, but treat the CMYK as a formula approximation and confirm with a proof.
- Before putting white text on a #0EA5E9 button, paste the colour and read its contrast: 2.77:1, well short of the 4.5 body AA needs and below even the 3:1 large-text floor. Darken the fill a step, or switch to black text at 7.58:1 on the same background — faster than editing styles and measuring in devtools.
Limits: Numeric notations (hex, rgb, hsl, hsv, cmyk, oklch) and all 148 CSS colour names are accepted. Names come from a fixed table rather than the browser, case, spaces and hyphens are ignored (LightBlue, light blue and light-blue are the same), and a typo gets nearby-name suggestions. Numeric input is parsed first; the name table is consulted only when the whole line is letters. CMYK is derived from sRGB by formula without a device ICC profile, so it is a reference only. OKLCH covers a wider gamut than sRGB, so out-of-gamut input is clamped to the boundary and the page says so. The HEX row stays six digits without alpha; copy HEX8 or RGBA when you need transparency.
Related tools:Sample a colour from an imageExtract a whole palette from an imageWork out what to pair with it
How it works
- Paste a value into the input — hex, rgb(), hsl(), hsv(), cmyk() or oklch() all parse, with commas or spaces; names like coral and steelblue work too, as does the system picker
- All eight formats update live; drag the H / S / L / A sliders to fine-tune, and the swatch and contrast follow
- Copy any row on its own or grab them all at once; the panel below shows white- and black-text contrast on this background with AA / AAA verdicts
FAQ
Why does my CMYK differ from the printer's value?
CMYK is a device-dependent space: the same numbers print differently on coated stock and newsprint, so there is no unique answer without the press ICC profile. This tool uses the standard sRGB formula, which gives a mathematically equivalent approximation that is fine for choosing and laying out colour; for production, use the printer's profile or a physical proof.
Why does an OKLCH value change when I paste it?
OKLCH spans a wider gamut than sRGB, so values that look fine on a Display-P3 screen can fall outside what sRGB can represent. The output here is sRGB hex, so out-of-range components are clamped to the boundary and the page shows an out-of-gamut notice. If you need the P3 original, do not treat the converted hex as the final value.
Can I type a colour name such as steelblue?
Yes. All 148 CSS named colours work, including coral, steelblue and rebeccapurple, and LightBlue, light blue and light-blue are the same. The table is built in rather than left to the browser, so every browser resolves a name identically. A typo such as cora shows nearby names under the input; click one to use it. Numeric notation is tried first, and the name table is consulted only when the whole line is letters.
Why did the input turn into hex after I dragged a slider?
The sliders work in H/S/L, and each step recomputes the colour and writes it back to the input as hex so you can copy it straight away. That write does not re-trigger parsing, which is why the knob does not jump back; you can keep pasting new values into the input at any time.
Related tools
Image to Base64
Convert images to Base64 Data URLs for HTML or CSS embedding.
Image Compare
Compare two images with a draggable slider and inspect before/after differences.
Favicon Generator
Turn one image into every favicon size, an ICO and a ready-to-use ZIP.
Color Scheme Generator
Feed in one seed colour or sample an image to get six harmonies, each swatch labelled with WCAG contrast and grey-level separation.
