Hex to RGB Converter

Convert a hex color to RGB and back, with a live swatch preview.

OfficeBuild an invoiceFill, preview, and download a clean invoice PDF in minutes.Open
#6a1b1brgb(106, 27, 27)

Type a hex code or RGB values — the other updates live and the swatch fills with the current color. Shorthand like #f00 expands to #ff0000.

How to convert a color

Type a hex code to see its red, green, and blue values, or enter RGB values to get the hex. The swatch fills with the current color as you type, so you can confirm it at a glance, then copy whichever format you need.

Why two formats

Hex is compact for CSS and design tools, while RGB maps directly to the three color channels and is easy to tweak by hand. Converting between them lets you move a color between any tool that prefers one form.

Questions

Does it support shorthand hex like #f00?
Yes. Three-digit shorthand is expanded to its six-digit form, so #f00 reads as #ff0000. You can type the code with or without the leading hash.
Can I convert RGB back to hex?
Yes, it works both ways. Enter red, green, and blue values from 0 to 255 and the matching hex code appears, with the swatch updating live so you can see the exact color.