Images & QR
RGB to Hex and Hex to RGB Converter
Convert RGB to hex or hex to RGB. Enter a three-channel RGB color, #RGB, or #RRGGBB and copy the exact CSS color values.
RGB and hexadecimal color codes describe the same three color channels. Each channel ranges from 0 through 255. Hex writes each channel as two base-16 digits, so RGB 255, 128, 0 equals #FF8000.
You receive a six-digit hex code, a CSS rgb() value, and the individual red, green, and blue channels.
- Convert RGB design specifications into CSS hex codes.
- Read the red, green, and blue components of a hex color.
- Expand shorthand hex colors before comparing values.
Instructions
- Enter #RGB, #RRGGBB, or three comma-separated integers.
- Select Convert.
- Copy the RGB or hex value into your stylesheet or design document.
Example
Input: rgb(255, 128, 0)
Settings: Three integer channels
Result: #FF8000
The shorthand #F80 represents #FF8800 instead, because each shorthand digit repeats.
Limits
- Use integer RGB channels from 0 through 255.
- Alpha, HSL, percentages, named colors, and image color sampling are not supported.
- This converter changes notation, not color profiles or display calibration.