RGB to HEX Converter
Convert any RGB color to HEX in your browser. No signup, no tracking — and below, the math behind the conversion.
Example conversion
RGB
rgb(59, 130, 246)
HEX
#3B82F6
How the conversion works
For each of R, G, B, convert the 0–255 decimal value to 2-character base-16. Concatenate with a leading `#`. 59 → `3B`, 130 → `82`, 246 → `F6`. Pad single-digit hex values with a leading zero — `5` becomes `05`, not `5`. The hex representation is shorter to type and the dominant format in design tooling.
Convert any color, not just this one
Open the full color picker to pick any color visually and see it in HEX, RGB, HSL, and OKLCH at the same time. The picker also generates palettes (complementary, analogous, triadic, monochromatic) you can copy with one click.