How to use RGB to HEX Converter — Free Online Color Code Tool
- 1Type a hex code, RGB or HSL value, or a CSS colour name — or pick from the swatch.
- 2Every format is listed at once: HEX, RGB, HSL, HSV and CMYK.
- 3Copy the notation you need, or click a tint or shade to carry on from it.
About RGB to HEX
Design tools tend to report colours as RGB while stylesheets tend to want hex, so this conversion comes up constantly. It is the same colour either way — three channel values, written in a different base.
The input here is deliberately forgiving, because RGB arrives in several shapes: comma-separated, space-separated, with or without the rgb() wrapper, sometimes with percentages, sometimes with a fourth alpha value. All of those are accepted rather than rejected on a formatting technicality.
If you are going the other way, or want to see the whole colour in every notation at once, the full colour converter covers HEX, RGB, HSL, HSV and CMYK together.