Convert RGB colour values to a HEX code you can paste into CSS or a design tool. Enter red, green and blue from 0 to 255, or type a hex code to see the RGB values.
| HEX | – |
| RGB | – |
How it works
A HEX colour is the red, green and blue values written in base 16, two digits each, after a hash. To convert, change each of the three numbers from decimal to hex and join them. 255 is FF, 102 is 66 and 0 is 00, so rgb(255, 102, 0) is #FF6600.
Example
rgb(0, 128, 255) is #0080FF.
Frequently asked questions
How do I convert RGB to HEX?
Convert each value from 0-255 to a two-digit hex number and join them after a #.
What is #FFFFFF?
White: red, green and blue are all 255.
Is HEX or RGB better for CSS?
Both work. HEX is shorter; RGB makes it easier to add transparency with rgba.
More free tools: HEX to RGB converter · Color converter · All free tools
Everything runs in your browser.