1. Home
  2. Tools
  3. Android colour converter

Free tool · runs in your browser

Android Color Converter (ARGB ⇄ Hex)

CSS puts transparency at the end of a hex colour; Android puts it at the start. Copy a theme colour across without checking and your status bar turns the wrong shade.

How to use it

  1. Enter a colour. Paste a hex, rgb() or rgba() value, or use the picker and alpha slider.
  2. Say which 8-digit order you mean. Choose CSS (#RRGGBBAA) or Android (#AARRGGBB) for 8-digit input.
  3. Copy the format you need. Copy the XML, Compose, Kotlin, Java or Flutter value.

Why the alpha moves

A hex colour with transparency has eight digits, and the two worlds disagree on where the alpha goes:

PlatformOrder80% opaque blue
CSS / web#RRGGBBAA#3B5BFDCC
Android XML#AARRGGBB#CC3B5BFD
Compose / Flutter0xAARRGGBBColor(0xCC3B5BFD)

Pasting #3B5BFDCC into an Android colour resource reads "3B" as the alpha (23% opaque) and shifts every channel — a classic cause of washed-out status bars and splash screens.

Kotlin and Java ints

In Kotlin, 0xCC3B5BFD is larger than Int.MAX_VALUE and is typed as Long, so the tool adds .toInt() when alpha is above 127. In Java the same literal is a valid negative int.

Choosing your app's theme colour for APK Maker? The CSS hex value is what the builder expects. See converting HTML to APK.

Everything happens on your device. Nothing you type or upload here is sent to a server.

Make your APK now — free

No Android Studio, no code, no watermark. Pick what you are starting from:

Frequently asked questions

What is #AARRGGBB?

Android's 8-digit hex colour format: two digits of alpha (opacity) followed by red, green and blue.

How do I write a transparent colour in Android XML?

Put the alpha first: 50% black is #80000000.

Is Flutter's Color the same as Android's?

Yes for the hex literal: Flutter's Color(0xAARRGGBB) uses the same alpha-first order.