handy.moe

All tools / Debug tools

An artist with a palette and brush

Colour converter

Type a colour in any CSS format and get it in every other one: hex, rgb, hsl, hwb, lab, lch, oklab and oklch.

Runs in your browser. Pasted data never leaves it.

How to use it

  1. Type a colour in any CSS format, or use the picker.
  2. Every other format appears below. Click one to copy it.
  3. Check the contrast tool next if the colour is for text.

Questions

Which formats does it read?

Hex (#f80, #ff8800, #ff880080), rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), the 148 CSS colour names, and bare 255, 136, 0. Percentages, / alpha and the modern space-separated syntax all work.

What are OKLCH and Lab?

They are perceptual colour spaces: equal numerical steps look like equal steps to the eye, unlike RGB and HSL. OKLCH (lightness, chroma, hue) is the modern choice for making palettes and gradients, and CSS supports it natively.

Why are some values slightly different from another tool?

Rounding. Values are computed in full precision and rounded for display, and Lab/LCH use the D50 white point as CSS does. Colours outside the sRGB range are clipped and flagged.

Does the picker send my colour anywhere?

No. Everything is computed in your browser.

Is what I paste or test sent anywhere?

No. This page works entirely inside your browser, and pasted data never leaves your device. It makes no network requests while you use it, and the page also tells your browser to block them (a Content-Security-Policy with connect-src 'none'), so even a bug could not send your data out. To check it yourself, open your browser's developer tools, go to the Network tab, and use the tool: nothing will appear. There is no account, no analytics and no logging.