Accepts #RGB, #RGBA, #RRGGBB, #RRGGBBAA, rgb(), rgba(), hsl() and hsla(). The # is optional.
Caps and lower case mean the same colour. This only changes how it is printed.
-
HEX
— -
HEX8
— -
RGB
— -
RGBA
— -
HSL
— -
HSV
— -
CMYK
—
Nothing is uploaded. Parsing, conversion and the swatch all happen in this browser tab. The page never sends your colour anywhere and does not save it.
Your colours are converted in this browser. Nothing is uploaded and nothing is saved.
A hex colour code packs three numbers into six characters: two for red, two for green and two for blue, each running from 00 to FF. This tool reads a code with or without the leading #, then prints the same colour as RGB, HSL, HSV and CMYK so it can move between a stylesheet, a design file and a printer’s brief without being converted by hand.
Shorter and longer forms are accepted. The three-digit form is shorthand, and the eight-digit form carries an alpha channel — the transparent grid behind the swatch shows which part of the colour is real and which part is the page showing through.
How to use this tool
- Type or paste a hex code into the field, with or without the #.
- Drag the alpha slider if you need a translucent colour; the 8-digit value updates as you move it.
- Copy any value with the button beside it — HEX, RGB, HSL, HSV or CMYK.
The four hex forms, and when each is useful
Hex accepts 3, 4, 6 and 8 digits. In the short forms each digit is doubled, so #f00 is exactly #ff0000. The 8-digit form adds opacity, which is why #ff000080 is red at roughly half strength.
- #f00 — shorthand for #ff0000
- #f00f — the same, with an alpha digit
- #ff0000 — all six digits, fully opaque
- #ff000080 — six digits plus alpha, about 50% opaque
What is rejected, and why
A code with the wrong number of digits, or one containing a letter past F, is not a colour, so the page says so instead of guessing. #12345 has five digits and no colour has five, but a value mangled by a build step often looks plausible at a glance — which is exactly when a clear message saves time.
The conversion happens in your browser
Parsing and every conversion run in this tab. No colour is sent anywhere and nothing is stored, so reloading the page returns it to its default.
Frequently asked questions
Does the hex code need the #?
No. #4f8ef7 and 4f8ef7 are read identically, and the copied value always includes the #.
Why does my 8-digit hex look transparent?
The last two digits are the alpha channel: 00 is fully transparent and FF is fully opaque, so #ff000080 is about half transparent.
Is #fff the same as #ffffff?
Yes. Each digit in the three-digit form is doubled, so f becomes ff.
Why does the HSL value have a decimal point?
Because one degree of hue moves a colour channel by up to about four steps out of 255. Rounding to whole degrees and whole percentages changes the colour — hsl(144, 88%, 56%) is not #2EF27E, while hsl(144.5, 88.3%, 56.5%) is. The fraction keeps the value honest, and CSS accepts it.