RGB to Hexadecimal Color Calculator
| ||
| ||
| ||
result: | |
The value of rgb is 16 multiplied by the first digit of HEX plus the second digit of HEX. The RGB and HEX digits below 10 are the same. The difference is that HEX is a two-digit number, and you can add 0 in front. 10 corresponds to A, 11 corresponds to B, 12 corresponds to C, 13 corresponds to D, 14 corresponds to E, and 15 corresponds to F. The following example illustrates the conversion method from RGB to HEX.
Example 1: rgb(11,111,222)=#??????
11÷16=0 remainder 11 11 corresponds to B. Add 0 in front, so the HEX data is 0B
111÷16=6 remainder 15 15 corresponds to F so the HEX data is 6F
222÷16=13 remainder 14 13 corresponds to D 14 corresponds to E So the HEX data is DE
The combined HEX data is #0B6FDE