HEX to RGB converter.
Paste a HEX code and get its red, green and blue values. Three, six and eight digit codes work, and RGB converts back to HEX in the same box.
3, 6 or 8 digits, with or without the hash.
Paste a HEX code and get its red, green and blue values. Three, six and eight digit codes work, and RGB converts back to HEX in the same box.
3, 6 or 8 digits, with or without the hash.
HEX to RGB converts a hexadecimal color code such as #1B4DE4 into its red, green and blue values (27, 77, 228). Each pair of hex digits is one channel from 00 to FF, which is 0 to 255 in decimal.
A HEX code is three bytes written in base 16. Split #1B4DE4 into 1B, 4D and E4, convert each to decimal (1B is 1 times 16 plus 11, which is 27) and you have rgb(27, 77, 228). Three-digit shorthand like #F60 expands each digit (#FF6600). Eight-digit HEX adds alpha as the last byte, which the converter reports as rgba() with the alpha from 0 to 1.
The converter also shows HSL, CMYK and OKLCH and links to the color's reference page with shades and harmonies.
White #FFFFFF is rgb(255, 255, 255). Black #000000 is rgb(0, 0, 0). Red #FF0000 is rgb(255, 0, 0). Navy #000080 is rgb(0, 0, 128). Gold #FFD700 is rgb(255, 215, 0). Skin tone #E1B899 is rgb(225, 184, 153).
Split the six digits into three pairs and convert each pair from hexadecimal to decimal. A0 is 160, FF is 255, 0C is 12.
rgb(255, 255, 255), which is white.
Yes. An eight-digit HEX (#1B4DE480) converts to rgba(27, 77, 228, 0.5).
Yes, the reverse field is on this page and the RGB to HEX page covers it in full.