Paste a colour in any CSS notation and get HEX, RGB, HSL and HWB back, with alpha preserved. Parsing matches what a browser accepts. Runs on your device.
Waiting for a colour
Paste a hex, rgb(), hsl() or hwb() value — everything is converted on your device.
Keywords understood: black, white, red, lime, blue, yellow, cyan, aqua and 20 more. For anything else, use a hex value.
Color Converter runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
The same colour has several equally valid spellings in CSS, and which one you want depends on what you are doing. HEX is compact and pastes cleanly into a design file. RGB maps directly onto what a screen does. HSL separates hue from saturation and lightness, which is what makes it the right notation for building a tint and shade scale from one brand colour. HWB expresses a colour as a hue with some white and some black mixed in, which is closer to how people describe paint.
This converter accepts every notation a browser does: three, four, six and eight digit HEX, the comma and space forms of rgb() and rgba(), hsl() and hsla(), hwb(), and the common colour keywords. Hue may be written in degrees, radians, gradians or turns. Alpha may be a number or a percentage, in any of the formats that carry it.
What it deliberately does not do is pretend to support the wide-gamut notations. lab(), lch(), oklab() and oklch() describe colours outside what sRGB can show, and converting one into HEX requires a gamut-mapping decision that changes the colour. Rather than return a value that looks authoritative and is subtly wrong, the tool declines them and says why.
Conversion between HSL, HWB and RGB is exact arithmetic in both directions, so a round trip returns where it started. Rounding happens only at the point of display, which is why a converted value sometimes differs by one in the last digit from a tool that rounds at every step.
Everything runs in your browser. The colour you are working with — which, for a brand in development, may be the one thing you do not want in someone's server log — never leaves the page.
HEX in three, four, six and eight digits, rgb() and rgba() in both comma and space syntax, hsl() and hsla(), hwb(), and the common CSS colour keywords. Hue accepts deg, rad, grad and turn units.
They can describe colours that sRGB cannot display, so converting them to HEX means choosing how to bring an out-of-gamut colour back in range — a decision that changes the colour. Returning a number that looks exact while being quietly wrong would be worse than declining.
Alpha. #RGBA is the short form and #RRGGBBAA the long one, where the last pair is opacity from 00 to FF. The tool reads both and writes the eight-digit form whenever a colour is not fully opaque.
When you are generating related colours rather than picking one. Hue, saturation and lightness are independent in HSL, so a lighter tint of a brand colour is one number away. In HEX it is three numbers away and the result is hard to predict.
Rounding. This converter keeps full precision through the arithmetic and rounds only when displaying, so a HEX to HSL to HEX round trip returns the original. Tools that round at each step can drift by one in the last digit.
The common ones are, and the full CSS list of 148 is not — the long tail is rarely typed by hand and some names are genuinely confusing. Any keyword that is not recognised is reported rather than silently treated as black.