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:

android:background="@color/colorBlackSemiTrans"

 

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

17 Comments on "Android Hexadecimal Color Transparency Chart"

Notify of
Sort by:   newest | oldest | most voted
trackback

Tadalafil 20 mg http://cialisvipsale.com/

Wonderful posts. Kudos!

trackback

Viagra online http://viagravipsale.com/

With thanks, Plenty of knowledge.

trackback

Cialis purchasing http://cialisyoues.com/

Wow a good deal of awesome tips!

trackback

How does viagra work http://rldta.com/

Amazing material. Appreciate it.

trackback

Cialis vs viagra http://kawanboni.com/

Very good posts. Thank you.

trackback

Cialis generika http://cialisvonline.com/

Kudos, I enjoy it.

trackback

Viagra 20 mg best price http://viagravonline.com/

Wonderful content. Cheers.

trackback

generic cialis http://cialisvus.com/

Beneficial advice. Thanks a lot.

trackback

cialis kaufen http://cialisbuys.com/

Information certainly taken..

trackback

cialis 20mg http://cialisonl.com/

You revealed this effectively.

trackback

low cost cialis 20mg http://cialisees.com/

With thanks, Plenty of knowledge!

trackback

write essay for me http://gsgfsdgfdhjhjhj.com/

Kudos! An abundance of info!

trackback

cialis alternative http://cialisky.com/

Whoa a lot of terrific information!

trackback

generic for cialis http://cialisiv.com/

Thanks! A good amount of forum posts!

trackback

generic for cialis http://cialisonla.com/

Thanks, Good stuff!

trackback

Google

We like to honor many other online web pages on the internet, even if they aren’t linked to us, by linking to them. Underneath are some webpages really worth checking out.

trackback

Parfum vergelijken

[…]Wonderful story, reckoned we could combine a handful of unrelated data, nonetheless genuinely really worth taking a look, whoa did 1 study about Mid East has got additional problerms as well […]

wpDiscuz