ProBuilder Advanced
July 16, 2017

Android Hexadecimal Color Transparency Chart

I was working on a daily quote app recently and was tasked with figuring out how to achieve transparency on a TextView with a background color.  In most situations there would be a simple transparency or opacity attribute that I could set to my desired setting.  This is not the case when developing in Android Studio.  Thanks to some clever searching I stumbled upon a post on Stack Overflow that contained all the information I needed:

Transparency %  Code
 100% 00
 90% 1A
 80% 33
 70% 4D
 60% 66
 50% 80
 40% 99
 30% B3
 20% CC
 10% E6
0% FF

Awesome!  Now all I had to do was prepend the given code to my color definition.  I ended up with the following color definition:

<color name="colorBlackSemiTrans">#CC000000</color>

Now you can simply set your TextView background value like so:



Happy developing!

Mike Wojcik
Mike Wojcik
WordPress Expert, Web & Game Developer, Superhero & Dad. Mike has been involved in software and web development for over a decade and has experience that covers a wide range of different areas ranging from server deployment and maintenance to project management to full scale website development from scratch.

Leave a Reply

9 Comments on "Android Hexadecimal Color Transparency Chart"

Notify of
Sort by:   newest | oldest | most voted

Tadalafil 20 mg

Wonderful posts. Kudos!


Viagra online

With thanks, Plenty of knowledge.


Cialis purchasing

Wow a good deal of awesome tips!


How does viagra work

Amazing material. Appreciate it.


Cialis vs viagra

Very good posts. Thank you.


Cialis generika

Kudos, I enjoy it.


Viagra 20 mg best price

Wonderful content. Cheers.


generic cialis

Beneficial advice. Thanks a lot.


cialis kaufen

Information certainly taken..