RGB to HEX
Three RGB numbers in, one hex code out.
FREE - NO SIGN-UP - RUNS ON YOUR DEVICE
Runs in your browser tab
- RGBin
- #out
- Liveswatch
- 0uploads
RGB to HEX at a glance
- Input
- RGB, or any of the other three
- Output
- A hex code, plus HSL and CMYK
- Method
- sRGB conversion, in the page
- Swatch
- A large block of the color
- Price
- Free
- Account required
- None
- Where processing happens
- On your device
How to use RGB to HEX
- 1
Enter the RGB numbers
Enter the RGB numbers.
- 2
Read the hex code
Read the hex code.
- 3
Copy it
Copy the hex code.
Frequently asked questions
Why does my hex code have letters in it?
Hexadecimal carries on past nine with A to F. A channel value above nine is written with a letter, which is why codes mix digits and letters.
Can I paste rgb(12, 34, 56) straight in?
The panel takes the three numbers in the RGB fields. Enter them as red, green and blue and the hex code follows.
Does the conversion lose anything?
No. Both notations describe the same sRGB values, so a color converted one way and back arrives where it started.
Is anything uploaded?
No. The work happens inside this browser tab. Nothing is sent to a processing server and no account holds it.
From design app to stylesheet
Put red, green and blue into the RGB fields. The hex code appears in the field above, ready for a stylesheet, with HSL and CMYK alongside.
- RGB is what most design apps show; hex is what most stylesheets carry.
- Two numbers entered the wrong way round still convert cleanly, so check the swatch too.
- Keep the RGB values if the file you are writing needs them later.
- HSL sits on the same panel, which is where lightness is easiest to read.
Full specification
| Input | Red, green and blue values. The same panel also takes HEX, HSL and CMYK. |
|---|---|
| Output | The hex code for that color, with HSL and CMYK filled in beside it. |
| Method | sRGB conversion and rounding, worked out in the page itself. |
| Swatch | A large block of the current color sits beside the fields. |
| Price | Free. Supported by clearly labelled ads outside the working area. |
| Account required | No. |
| Where processing happens | In your browser tab. Your input is never uploaded. |
Keep going with the same files
All color tools: Color tools on SPOTTOOLS