Skip to content
hateitall

Color Picker and Converter

Type or pick one colour and get it in every CSS format, with a clear warning when a format cannot hold it.

Processed locallyIn: Colour, HEX, CSS colourOut: HEX, RGB, HSL, OKLCH, Lab, P3

Loading tool…

How to use color picker and converter

  1. Type a colour in any CSS syntax, open the colour picker, or use Pick from screen in Chrome and Edge.

  2. Read it in eleven formats at once; each row has its own copy button.

  3. Nudge lightness, chroma and hue with the OKLCH sliders to get a related colour.

  4. If a warning appears, the colour is outside sRGB and the rows marked mapped show the nearest colour that fits.

What this tool does

  • Reads HEX with 3, 4, 6 or 8 digits, rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), color() in srgb, srgb-linear, display-p3 and xyz, and every CSS colour name.
  • Uses the matrices and transfer functions published in CSS Color 4, so OKLCH and Lab values match what browsers compute.
  • Detects colours outside sRGB and outside Display P3, and maps them back with the CSS Color 4 chroma reduction method instead of clipping.
  • Keeps alpha through every conversion and shows the colour next to its sRGB version so you can see what mapping changed.

How the result is verified

Every CSS string the tool prints is parsed again and compared with the input in OKLab; the page says so when all of them land within 0.0005 of the original.

Frequently asked questions

Why does my OKLCH colour show a different HEX value?

Your OKLCH colour is more saturated than sRGB can show. HEX, RGB and HSL can only describe sRGB, so the tool lowers chroma at the same lightness and hue until it fits, as the CSS Color 4 specification recommends. The OKLCH value itself is unchanged.

Should I write colours in OKLCH?

It is a good choice for design systems: equal steps in lightness look equal, and hue does not drift when you change lightness. Every current major browser supports oklch(). Keep a HEX fallback only if you must support browsers from before 2023.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

WCAG 2 ratio with AA and AAA results, plus a suggested fix

Colour · HEX · CSS colour→ Contrast ratioLight on device

50 to 950 scales, harmonies and tints from one colour

Colour · HEX · CSS colour→ CSSLight on device

Pick exact HEX, RGB and HSL colours from any image

PNG · JPEG · WebP +→ HEXLight on device

Linear, radial and conic gradients with OKLCH blending, CSS and PNG

Colour→ CSSLight on device

Simulate a palette for four colour blindness types and flag clashing pairs

Colour list · HEX · CSS colour→ Simulated paletteLight on device