← all tools
Colour ↔ Kotlin Int
Why your red is -65536. Convert between hex, ARGB, and the signed 32-bit integer Android actually stores.
Every representation
Android packs colour into a signed 32-bit Int. That means opaque red (#FF0000) is -65536 in the debugger, and opaque black is -16777216 rather than 0. Nothing is broken — the top bit is alpha, and it makes the number negative. This converts in both directions and shows every representation at once, so you can paste the value you have and get the one you need.