Example 1
- #FF5733
- source hex
#FF5733
What HEX from #FF5733? #FF5733. A convert, not a picker.
Type HEX or RGB. #FF5733 stays #FF5733. #0F0 becomes #00FF00. 255, 87, 51 become #FF5733. An sRGB convert, not a color picker.
Enter #RRGGBB or R, G, B channels (0–255), click Calculate, and copy CSS-ready output.
This converts #RRGGBB ↔ rgb(r,g,b), channels 0-255. No HSL and no picker. Another base sits on binary / hex / decimal.
Enter a color, choose the direction, and click Calculate.
RGB is an additive color model used on screens. A color is mixed from three light channels: red (R), green (G), and blue (B). Higher channel values mean stronger light in that channel.
In typical CSS notation each channel is an integer from 0 to 255 (8 bits per channel). Zero means no light in that channel; 255 means full intensity.
rgb(255, 0, 0) — redrgb(0, 255, 0) — greenrgb(0, 0, 255) — bluergb(0, 0, 0) — black (no light)rgb(255, 255, 255) — white (all channels full)HEX is another notation for the same values. Instead of three decimal numbers you use a hexadecimal string in the form #RRGGBB:
RR — redGG — greenBB — blueEach pair is one 0–255 number written in hex (digits 0–9 and letters A–F). So #FF0000 is the same color as rgb(255, 0, 0).
Manual HEX → RGB conversion works like this:
# if present (e.g. #4CAF50 → 4CAF50).RR, GG, BB.rgb(r, g, b).A useful rule for one hex pair:
decimal value = 16 × first digit + second digit
Where A=10, B=11, C=12, D=13, E=14, F=15. Example: 4C → 16 × 4 + 12 = 76.
The other way (RGB → HEX): convert each 0–255 channel to a two-digit hex value and join them as #RRGGBB. This calculator performs both directions when you click Calculate.
Take the color #4CAF50.
| Step | Value | Calculation |
|---|---|---|
| Input | #4CAF50 | drop # → 4CAF50 |
| Split | 4C · AF · 50 | RR · GG · BB |
| R | 4C | 16 × 4 + 12 = 76 |
| G | AF | 16 × 10 + 15 = 175 |
| B | 50 | 16 × 5 + 0 = 80 |
| Result | rgb(76, 175, 80) | |
The reverse is the same values: 76, 175, 80 → #4CAF50.
#RRGGBB, RRGGBB, or shorthand #RGB). The R, G, B fields are then read-only outputs.#), rgb(r, g, b), separate channels, a color preview, a CSS snippet, and Copy buttons.Switching the source clears the previous result — click Calculate again after changing direction.
Shorthand #RGB works only when both digits of each full pair are identical. Then one character per channel is enough:
#FFF = #FFFFFF (white)#000 = #000000 (black)#F00 = #FF0000 (red)Expansion duplicates each character: F → FF, 0 → 00.
This calculator accepts HEX shorthand and expands it to full #RRGGBB before conversion. When you enter shorthand, the results area also shows a short expansion note.
# → three pairs → each pair to decimal → rgb(r, g, b)#16 × first + second| Color | HEX | RGB |
|---|---|---|
| Black | #000000 | rgb(0, 0, 0) |
| White | #FFFFFF | rgb(255, 255, 255) |
| Red | #FF0000 | rgb(255, 0, 0) |
| Green | #00FF00 | rgb(0, 255, 0) |
| Blue | #0000FF | rgb(0, 0, 255) |
| Yellow | #FFFF00 | rgb(255, 255, 0) |
| Material green | #4CAF50 | rgb(76, 175, 80) |
HEX ↔ RGB Color Converter in this calculator converts a colour notation. #FF5733 stays #FF5733. #0F0 becomes #00FF00. 255, 87, and 51 become #FF5733. The calculator is not a color picker and has no HSL.
Field hex-val is HEX text. Fields rgb-r, rgb-g, rgb-b are channels 0-255. Fill keeps hex-rgb-source hex or rgb. #RGB expands: #0F0 becomes #00FF00. The extras result is uppercase #RRGGBB.
#FF5733 does not come from a Figma eyedropper. #00FF00 is not a system palette. The third card starts from RGB, not a picker. You type the values. There is no alpha.
Binary / hex / decimal next door reads FF as 255. ASCII reads a character. Here #FF5733 stays #FF5733, the convert alone.
Type #FF5733, source hex, then Calculate. The result is #FF5733. #0F0 becomes #00FF00. 255, 87, 51 with source rgb also become #FF5733.
#FF5733 stays #FF5733. #0F0 becomes #00FF00. 255, 87, 51 become #FF5733. Another HEX changes the result.
#RRGGBB ↔ rgb(r,g,b); #RGB expands. Channels 0-255, not a picker.
HEX ↔ RGB, channels 0-255. #FF5733 stays #FF5733. Not a picker.
#FF5733
What HEX from #FF5733? #FF5733. A convert, not a picker.
#00FF00
What HEX from #0F0? #00FF00. Short #RGB expands.
#FF5733
What HEX from rgb(255, 87, 51)? #FF5733.
#FF5733. The same HEX. A convert, not a picker.
#00FF00. Short #RGB expands to #RRGGBB.
#FF5733. Source rgb in the fill.
No. No eyedropper and no colour wheel. Fields only.
No. Only sRGB 0-255 and #RRGGBB or #RGB.
hex reads hex-val. rgb reads three channels. It is in the fill.
That card turns FF into 255 as a number. Here #FF5733 stays a colour.
Yes, the calculator raises it to #FF5733. Extras take uppercase.
Not on source hex. On rgb you need three channels.
The calculator counts bits, bytes or throughput from your numbers. Below are SI and bit definitions (NIST).
Page updated in 2026.