HEX to RGB Converter
Convert a hex color code to RGB instantly, with HSL, HWB, OKLCH and CMYK too. Supports 3, 4, 6 and 8-digit hex with alpha.
-
rgb
-
hex
-
hsl
-
hwb
-
oklch
-
cmyk
Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.
How to use the HEX to RGB Converter
- 1 Type or paste a hex code, with or without the #, or pick a color.
- 2 Read the RGB value and the other formats below the swatch.
- 3 Click Copy next to the format you need.
About the HEX to RGB Converter
A hex color code such as #0d9488 is three pairs of hexadecimal digits: red, green and blue, each from 00 to ff (0 to 255). The converter reads those pairs and shows the same color as rgb(13, 148, 136), the notation used in CSS, design tools and many programming libraries.
Short codes are expanded the way browsers do: #f53 becomes #ff5533. An eighth-digit pair is the alpha channel, so #ff573380 is the same orange at about 50% opacity and is shown as rgba().
Next to RGB you also get HSL and HWB (easier to adjust by hand), OKLCH (the modern, perceptually even CSS color space) and CMYK as a rough starting point for print. The CMYK value is a simple mathematical conversion, not a color-managed print profile.
Frequently asked questions
How do I convert hex to RGB by hand?
Split the code into three pairs and convert each from base 16 to base 10. For #0d9488: 0d = 13, 94 = 148, 88 = 136, so rgb(13, 148, 136).
Do I need to type the #?
No. 0d9488 and #0d9488 both work, in lower or upper case.
What does an 8-digit hex code mean?
The last two digits are the alpha channel: 00 is fully transparent, ff fully opaque, 80 about 50%.
Is the CMYK value exact for printing?
No. It is a device-independent formula. For print, use your printer’s ICC profile in a design application.