About transparent, translucent, percent conversion in Android

Source: Internet
Author: User

In the XML file, you can write #0000 directly, this is the effect of full transparency.
#9000这个值相当于56%, because the color value is 16 binary, #9000相当于 (9/16)
As a percentage, you can convert it according to this ratio.
Fully Transparent #0000
10% Transparent #1600
20% Transparent #3200
30% Transparent #4800
40% Transparent #6400
50% Transparent #8000
60% Transparent #9600
70% Transparent #B200
80% Transparent #C800
90% Transparent #E400
Opaque (Black) #F000

About transparent, translucent, percent conversion in Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.