CSS white
- Input
- 16777215₁₀
- Expected output
- FFFFFF
Three FF pairs, one per saturated RGB channel; no 0x prefix, since the tool returns only the bare hexadecimal digits.
decimal to hexadecimal
Each hexadecimal digit covers exactly 4 binary bits, a nibble, because 2⁴ is 16, the total number of symbols from 0 to F. That is why two hex digits are enough to represent a whole byte: 255₁₀, the largest 8-bit value, becomes FF₁₆. The tool returns the result without a 0x prefix, just the digits in uppercase letters, the bare format many programming languages expect before adding the prefix themselves.
Three FF pairs, one per saturated RGB channel; no 0x prefix, since the tool returns only the bare hexadecimal digits.
8080 no longer fits in three nibbles (4095 is the ceiling), so the result has 4 hex digits instead of 3.
4096 is 2¹², a common memory alignment boundary; the three trailing zeros in hex are three whole zeroed nibbles.
Converting a number between bases means representing the same value using a different set of digits. A decimal (base 10) number can be expressed exactly in binary (base 2), hexadecimal (base 16), or any other base.
No: the tool shows only the hexadecimal digits, like FF or 1F90, with no prefix at all. If the destination requires 0x or #, as in CSS or C, it has to be added manually before using the value.
Because a hex digit needs to cover exactly the 16 combinations of a 4-bit nibble (2⁴ = 16); using only 0 through 9 would leave 6 combinations without a symbol, which is why the letters A through F complete the alphabet up to 15.
It depends on the value: each extra hex digit multiplies the range by 16, so 2 digits cover up to 255, 3 up to 4095 and 4 up to 65535. 8080, for example, needs 4 digits (1F90) because it exceeds the 3-digit ceiling.
All data stays in your browser. No numbers are sent to any server.