Example: a brand guide that only lists RGB
A client's printed brand guidelines give their navy as R 30, G 58, B 95 and their accent orange as R 255, G 140, B 0. The website builder and the email template editor both want HEX codes.
Typing the two sets of numbers gives #1E3A5F and #FF8C00. The preview panel shows each colour with its code in a readable text colour on top, so you can confirm at a glance that it matches the printed sample.
Red 30, Green 58, Blue 95 Red 255, Green 140, Blue 0
#1E3A5F #FF8C00
Converting a colour
Type or slide
Fill in Red, Green and Blue with whole numbers from 0 to 255, or move the slider under each box.
Check the preview
The panel fills with the colour and shows its HEX code. If a value is out of range or not a whole number, a message tells you instead.
Copy the code
Press Copy HEX for capitals, such as #1E3A5F, or Copy lower case for #1e3a5f. Browsers treat both the same; pick whichever matches your style sheet.
How the conversion works
Each channel becomes two hexadecimal digits: divide by 16 for the first digit and keep the remainder for the second. The digits 10 to 15 are written A to F.
| Channel | Decimal | Sum | HEX pair |
|---|---|---|---|
| Red | 30 | 1 x 16 + 14 | 1E |
| Green | 58 | 3 x 16 + 10 | 3A |
| Blue | 95 | 5 x 16 + 15 | 5F |
| Any channel | 255 | 15 x 16 + 15 | FF |
Questions people ask
Is a HEX code the same colour as the RGB values?
Yes. A HEX code is simply the three RGB numbers written in base 16 and joined together, so #1E3A5F and rgb(30, 58, 95) describe exactly the same colour on screen. Nothing is approximated or rounded in the conversion.
Can I convert CMYK print values here?
Not directly. This tool takes screen RGB values only. CMYK depends on inks and paper, so converting it to RGB is an estimate. The colour code converter accepts several formats and shows a CMYK figure, but for exact print matches ask the printer for their profile.
What about transparency or RGBA?
This converter handles the three colour channels and gives a six-digit code. If you need an alpha value, the colour code converter reads rgba() and eight-digit HEX codes and shows the matching formats side by side.
Where your data goes
Your three numbers are turned into a code by the page itself. No colour values are uploaded, logged or remembered between visits.
Checked against the tool on