Convert Hex to Jetpack Compose & XML
Convert web #RRGGBB or #RRGGBBAA codes into Jetpack Compose Color(0xAARRGGBB) Kotlin and Android XML <color> tags.
0 bytes sent
- 100% browser-local
- Zero server transfers
- CSS Color 4 precision
or drop a color string, CSS/JSON snippet, or file here · Ctrl V to paste · Paste Hex, RGB, HSL, OKLCH or use Screen Eyedropper
Instant Before & After Specimen
Jetpack Compose Color(0xAARRGGBB) + XML#2563EB// Jetpack Compose
val BrandColor = Color(0xFF2563EB)
<!-- res/values/colors.xml -->
<color name="brand_color">#FF2563EB</color>How to use Hex to Android XML & Compose
Hex to Android XML & Compose — cleanly inside your local browser with zero server transfers.
- Enter or pick a colorType Hex, RGB, HSL, OKLCH, or Lab — or click Screen Eyedropper and live sliders.
- Inspect math & gamutReview exact CSS Color 4 readouts, sRGB vs Display P3 status, and profile options.
- Copy, chain, or exportCopy ready CSS/JSON snippets, download binary swatch files, or pipe directly to related Colr tools.
Format specs:HEX (.css / .txt)
Frequently asked questions
Why does Android put alpha first (#AARRGGBB) instead of last (#RRGGBBAA)?
Android resources and Compose follow ARGB 32-bit int layout (0xAARRGGBB), whereas CSS puts alpha at the end — Colr reorders bytes automatically.
Does it handle 8-digit CSS alpha correctly?
Yes — #2563EB80 maps accurately to Color(0x802563EB) in Compose Kotlin.