How a hex code maps to RGB
A six digit hex code is three base-16 byte pairs. Split it into ff, 57 and 33, then convert each pair to decimal: the first hex digit counts sixteens and the second counts ones. So ff is 15×16 + 15 = 255, 57 is 5×16 + 7 = 87 and 33 is 3×16 + 3 = 51. Short three digit codes such as #f53 simply double each digit to #ff5533.
Once you are done here, the RGB to hex converter picks up where this leaves off.
Why designers need the RGB form
Hex is fine for solid fills, but the moment you need transparency you need channels: rgba(255, 87, 51, .15) gives a soft tint of the same brand colour for hover states, focus rings and card shadows. RGB is also what canvas, SVG filters, most design token pipelines and native mobile colour objects expect. Once you have the channels you can push them into the RGB to HSL converter to reason about hue and lightness instead of raw numbers.
For a closely related job, the colour picker does it in one click.
Reading the badge
The tool also reports whether the swatch is light or dark using perceived luminance, which weights green far more heavily than blue. That is a quick sanity check before you place text on the colour — for a real pass or fail, run it through the contrast checker.
Everything is converted in your browser, so the codes you paste are never uploaded or stored.
Frequently asked questions
- What is #ff5733 in RGB?
- It is rgb(255, 87, 51) — a saturated coral orange with the red channel at maximum.
- Does it accept three digit hex codes?
- Yes. Shorthand like #f53 is expanded to #ff5533 before conversion, exactly as browsers do.
- Do I need the # sign?
- No. The converter strips a leading hash if you paste one and works either way.
- How do I add transparency?
- Take the three channels and add an alpha value from 0 to 1, for example rgba(255, 87, 51, 0.2).
- Does it handle 8-digit hex codes with alpha?
- No — the converter reads 3 and 6 digit codes only, so an 8-digit value like #ff5733cc is not accepted. Drop the last two digits, convert the remainder, then add the alpha yourself as a 0-1 decimal in rgba().