Integer to RGB Converter
Unpack a 24-bit integer (0xRRGGBB) into its red, green, and blue channel values.
How to use this tool
- Enter a 24-bit integer (0–16777215).
- The tool extracts the red, green, and blue channels via bit-shifts.
- You also get the equivalent hex color code.
Unpack a 24-bit integer color value into its R, G, B channels and hex string. Useful when working with game engines or low-level graphics.
Frequently asked questions
- How do you extract RGB from an integer?
- R = (n >> 16) & 0xFF, G = (n >> 8) & 0xFF, B = n & 0xFF.
- What is 16777215?
- It is 0xFFFFFF in hex, which is pure white (255, 255, 255).