Decimal to hexadecimal converter for rgb colors
Convert each RGB channel (0–255) from decimal to hex and concatenate as #RRGGBB; our converter handles each channel as its own integer.
Detailed answer
RGB stores three bytes. For channel value 255, decimal-to-hex gives FF; 10 → 0A. Use the Decimal to Hexadecimal page three times (R, G, B) or the hub and pick hex output. This site’s tool treats each input as one integer in decimal and outputs hex with the usual 0–9A–F digits (optional 0x). It does not paste a full “rgb(r,g,b)” string in one field—split channels for predictable results.
Relationship context
Hex is compact for bytes: two hex digits cover exactly eight bits, which matches one RGB channel. Designers and CSS workflows routinely jump between decimal sliders and hex literals.
Quick conversion table
| Decimal (input) | Hexadecimal (output) |
|---|---|
| 0 | 0 |
| 1 | 0x1 |
| 2 | 0x2 |
| 3 | 0x3 |
| 4 | 0x4 |
| 5 | 0x5 |
| 6 | 0x6 |
| 7 | 0x7 |
| 8 | 0x8 |
| 9 | 0x9 |
| 10 | 0xa |
| 15 | 0xf |
| 16 | 0x10 |
| Decimal (input) | Hexadecimal (output) |
|---|---|
| 11 | 0xb |
| 32 | 0x20 |
| 64 | 0x40 |
| 128 | 0x80 |
| 256 | 0x100 |
| 512 | 0x200 |
| 1024 | 0x400 |
| 2048 | 0x800 |
| 4096 | 0x1000 |
| 8192 | 0x2000 |
| 16384 | 0x4000 |
| 32768 | 0x8000 |
| 65535 | 0xffff |
More Decimal converters
Dedicated pages from Decimal to every other format (binary, octal, decimal, hexadecimal, character), with the same parsing rules as the main Number System Converter.