Enter a HEX color
Use #RGB, #RGBA, #RRGGBB, or #RRGGBBAA notation. The # sign is optional when typing.
Color conversion tool
Enter a HEX color to read its red, green, and blue channels. Four- and eight-digit values also return the embedded alpha transparency.
Use #RGB, #RGBA, #RRGGBB, or #RRGGBBAA notation. The # sign is optional when typing.
Copy the CSS value or inspect every decoded channel.
#4F46E579, 70, 229rgb(79, 70, 229)hsl(243, 75%, 59%)hsv(243, 69%, 90%)Not includedA HEX color writes the red, green, and blue channels as base-16 pairs. This converter expands shorthand when needed, decodes each pair to a decimal value from 0 to 255, and returns a CSS-ready rgb() or rgba() value.
The conversion happens locally in this browser. Alongside RGB, the result shows normalized HEX, HSL, HSV, and a live preview so you can verify the color before using it.
The first pair is red, the second is green, and the third is blue. Each pair is read as a base-16 number: 4F becomes 79, 46 becomes 70, and E5 becomes 229.
Three-digit shorthand duplicates each character before decoding, so #F08 expands to #FF0088.
#4F46E5 -> 4F, 46, E5 -> rgb(79, 70, 229)
CSS places the alpha pair last. #RGBA expands to #RRGGBBAA, while a six-digit value has no embedded alpha and returns a standard rgb() result.
The alpha byte is divided by 255 and shown to three decimal places when necessary. For example, the final 80 in #0FA0FF80 becomes an alpha value of about 0.502.
HEX and rgb() syntax on this page follows the CSS Color Module Level 4.
Enter a valid 3- or 6-digit HEX color. The converter expands shorthand, reads each red, green, and blue pair as a base-16 number, and returns decimal channels from 0 to 255.
Yes. Enter #RRGGBBAA or #RGBA. The final pair is decoded as alpha and the result is returned as an rgba() value.
#FFFFFF is rgb(255, 255, 255). FF is the maximum two-digit hexadecimal value for each color channel.
#RGB is shorthand. Each character is duplicated, so #F08 means #FF0088. Both forms describe the same three RGB channels.
No. It decodes the numeric color notation as an sRGB web color and does not perform monitor, print, or ICC profile conversion.