Plainjar
Back to all tools

— generators —

Live

Colour converter

Switch between HEX, RGB, HSL and OKLCH, type in one field, the rest update live.

runs entirely in your browser

Convert one colour into HEX, RGB, HSL and OKLCH at once. Type in any field and the other three update right away.

Paste a colour or pick one with the picker. Handy when you move a brand colour between design and code, or convert to the newer OKLCH space.

Everything runs in your browser. Your colour values go nowhere, with no account or upload needed.

Works with HEX (3 or 6 digits), RGB, RGBA, HSL, OKLCH, or a bare 'r, g, b' triplet.

Frequently asked questions

What's OKLCH and why use it?

OKLCH is a perceptually uniform colour space: equal changes in L (lightness) or C (chroma) look equal to the human eye. Handy for design tokens (consistent lightness scales) and CSS color-mix. Natively supported by all modern browsers since 2023.

Does my colour go to a server?

No. All conversions happen in your browser via pure JavaScript math. No API calls, no tracking. Open the Network tab and you'll see no request when changing values.

Why does the tool sometimes say 'outside sRGB'?

Many OKLCH values (especially high chroma) have no exact equivalent in the older sRGB colour space that monitors support. We clamp to the closest sRGB colour and warn you, otherwise you'd get a 'wrong' RGB output without knowing.

Which colour formats can I paste?

HEX (#fff, #ffffff, or without #), rgb()/rgba(), hsl()/hsla(), oklch() (with or without % on L), and bare 'r, g, b' comma triplets. Case-insensitive on the function name.

— related tools —

Related tools

This tool runs entirely in your browser. Nothing is uploaded or stored on a server.

Colour converter — Plainjar