RGB to HEX formula
Convert each channel (0–255) to two hex digits and join them: 255 → FF, 99 → 63, 71 → 47 → #FF6347. Values under 16 need a leading zero (10 → 0A).
Decimal to hex for channel values
| Decimal | Hex |
|---|---|
| 0 | 00 |
| 17 | 11 |
| 34 | 22 |
| 51 | 33 |
| 64 | 40 |
| 85 | 55 |
| 102 | 66 |
| 128 | 80 |
| 153 | 99 |
| 170 | AA |
| 192 | C0 |
| 204 | CC |
| 221 | DD |
| 238 | EE |
| 255 | FF |