Color Converter (HEX, RGB, HSL)

Convert colors between HEX, RGB, HSL, OKLCH and CMYK (with alpha), get the nearest CSS color name, paste any format or use sliders. Free, in your browser.

You can also type a CSS color name (e.g. rebeccapurple).

#5b8cff
rgb(91, 140, 255)
hsl(222, 100%, 68%)
hsv(222, 64%, 100%)
oklch(66.2% 0.179 264.6)
cmyk(64%, 45%, 0%, 0%)
Nearest name: ≈ cornflowerblue

🔒 Converted entirely in your browser — nothing is uploaded.

Convert between color formats

Pick a color or paste a HEX, rgb(), hsl(), oklch() or cmyk() value and instantly get every other format, with a live swatch and R/G/B and H/S/L sliders to fine-tune. The output includes OKLCH (CSS Color 4), the perceptual format modern design systems like Tailwind v4 and shadcn ship in. Add an alpha value to produce rgba(), hsla(), oklch(… / a) and 8-digit HEX. Copy any format with one click. Handy for CSS, design work and matching colors across tools. Everything runs locally in your browser.

Frequently asked questions

Which formats are supported?

HEX (3-, 6- or 8-digit), rgb()/rgba(), hsl()/hsla(), oklch() and cmyk(). Type or paste any of them, or drag the sliders, and the others update instantly.

Can I convert CMYK to HEX?

Yes — paste a cmyk() value such as cmyk(0%,100%,100%,0%) and get HEX, RGB and HSL back. It uses the standard formula without an ICC profile, so treat it as a screen-matching approximation, not a print-accurate proof.

Does it support OKLCH?

Yes. The oklch() row shows the current color in CSS Color 4 OKLCH, and you can paste an oklch() value to convert it back to HEX/RGB. Because this tool works in sRGB, a wide-gamut OKLCH value is clamped to the nearest sRGB color.

Does it support transparency (alpha)?

Yes — set the alpha slider and it outputs rgba(), hsla(), oklch(… / a) and 8-digit HEX; the preview shows transparency over a checkerboard.

Can I copy the result for CSS?

Yes — each value has a Copy button ready to paste into your stylesheet.