Decimal integer to HEX color
Enter the integer to see its HEX code, rgb() string and the three channel values.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter decimal integer.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
R = floor(n ÷ 65536), G = floor(n ÷ 256) mod 256, B = n mod 256, then each channel is written as two hex digits.
Example
Inputs: Decimal integer = 16,744,448. Result: HEX code: #FF8000; Red R: 255; Green G: 128.
Limits and caveats
- Negative numbers or values above 16777215 usually carry alpha (like Android colors); use the Android tool for those.
Questions about this tool
What color is 0?
0 is black #000000 and 16777215 is white #FFFFFF.
Why does Discord show colors as numbers?
Discord stores the embed color as an integer, which is the same HEX value read in base 10.
Can I enter fractions?
No. A color integer is always whole, so fractions return an error.
