Convert HEX to RGB
Paste a HEX color to get its RGB value — and every other format — with a live swatch. All in your browser.
That doesn't look like a valid color.
- HEX
-
- RGB
-
- HSL
-
- OKLCH
-
HEX to RGB, explained
A HEX code writes the red, green and blue channels as a six-digit hexadecimal number prefixed with #, the format most design tools and stylesheets use.
RGB describes a color by its red, green and blue channels, each from 0 to 255 — the form canvas drawing and image code expect.
Worked example
#f59e0b converts to rgb(245, 158, 11). The converter above is pre-filled with this color — edit it or pick your own to see the result update live.
HEX to RGB reference table
| Color | HEX | RGB |
|---|---|---|
| Amber | #f59e0b | rgb(245, 158, 11) |
| Navy | #0a1828 | rgb(10, 24, 40) |
| Red | #dc2626 | rgb(220, 38, 38) |
| Green | #16a34a | rgb(22, 163, 74) |
| Sky | #0ea5e9 | rgb(14, 165, 233) |
Common uses
Designers copy a HEX code from a mockup, but canvas drawing, image libraries and some CSS need the raw red, green and blue channel values.
Related conversions
Need another format? The full color converter reads HEX, RGB, HSL, OKLCH and CSS named colors and shows them all at once.
Frequently asked questions
How do I convert HEX to RGB?
Paste your HEX value into the converter above and it shows the RGB equivalent — along with every other format — instantly. For example, #f59e0b becomes rgb(245, 158, 11).
What is HEX #f59e0b in RGB?
#f59e0b in RGB is rgb(245, 158, 11).
Is my color sent to a server?
No. Every conversion runs locally in your browser using the canvas color parser and standard color math, so nothing you enter is uploaded.