Hello friends,In this tutorial i show you how to set color as a transparent by using HEX code e.g.FFFFFF (solid White). transparent means like a glass.we can see view object which is behind of first object,in android we can see Layout which is behind of first Layout.
In this example i give you color code that help you to make any color as a Transparent color. basically Black and white is widely use to set transparent color background of any object such as Button,Label,Layout color etc.
Mostly solid color is use to set color that we can write like this "#FFF" (RGB) or "#FFFFFF" (RRGGBB) White color,but now we want to convert this solid white color into Transparent color than we write like this "#30FFFFFF", it meant we set color opacity (transparency-level) 30% transparent.
- "FF" = 100% solid
- "00" = 0% (Black)
Here i provide you some transparent color code with a percentage wise in a string format:
<!--Transparent Black HEX-->
<color name="transparent_black_1">#11000000</color>
<color name="transparent_black_2">#22000000</color>
<color name="transparent_black_3">#33000000</color>
<color name="transparent_black_4">#44000000</color>
<color name="transparent_black_5">#55000000</color>
<color name="transparent_black_6">#66000000</color>
<color name="transparent_black_7">#77000000</color>
<color name="transparent_black_8">#88000000</color>
<color name="transparent_black_9">#99000000</color>
<color name="transparent_black_10">#aa000000</color>
<color name="transparent_black_11">#bb000000</color>
<color name="transparent_black_12">#cc000000</color>
<color name="transparent_black_13">#dd000000</color>
<color name="transparent_black_14">#ee000000</color>
<color name="transparent_black_15">#ff000000</color>
<color name="transparent_black_16">#80000000</color>
<color name="transparent_white_17">#A0000000</color>
Take Ratio 5%:
<color name="transparent_black_5">#0D000000</color>
<color name="transparent_black_10">#1A000000</color>
<color name="transparent_black_15">#26000000</color>
<color name="transparent_black_20">#33000000</color>
<color name="transparent_black_25">#40000000</color>
<color name="transparent_black_30">#4D000000</color>
<color name="transparent_black_35">#59000000</color>
<color name="transparent_black_40">#66000000</color>
<color name="transparent_black_45">#73000000</color>
<color name="transparent_black_50">#80000000</color>
<color name="transparent_black_55">#8C000000</color>
<color name="transparent_black_60">#99000000</color>
<color name="transparent_black_65">#A6000000</color>
<color name="transparent_black_70">#B3000000</color>
<color name="transparent_black_75">#BF000000</color>
<color name="transparent_black_80">#CC000000</color>
<color name="transparent_black_85">#D9000000</color>
<color name="transparent_black_90">#E6000000</color>
<color name="transparent_black_95">#F2000000</color>
<!--Transparent White HEX-->
<color name="transparent_white_1">#11ffffff</color>
<color name="transparent_white_2">#22ffffff</color>
<color name="transparent_white_3">#33ffffff</color>
<color name="transparent_white_4">#44ffffff</color>
<color name="transparent_white_5">#55ffffff</color>
<color name="transparent_white_6">#66ffffff</color>
<color name="transparent_white_7">#77ffffff</color>
<color name="transparent_white_8">#88ffffff</color>
<color name="transparent_white_9">#99ffffff</color>
<color name="transparent_white_10">#aaffffff</color>
<color name="transparent_white_11">#bbffffff</color>
<color name="transparent_white_12">#ccffffff</color>
<color name="transparent_white_13">#ddffffff</color>
<color name="transparent_white_14">#eeffffff</color>
<color name="transparent_white_15">#ffffffff</color>
<color name="transparent_white_16">#80ffffff</color>
<color name="transparent_white_17">#A0ffffff</color>
Take Ratio 5%:
<color name="transparent_white_5">#0Dffffff</color>
<color name="transparent_white_10">#1Affffff</color>
<color name="transparent_white_15">#26ffffff</color>
<color name="transparent_white_20">#33ffffff</color>
<color name="transparent_white_25">#40ffffff</color>
<color name="transparent_white_30">#4Dffffff</color>
<color name="transparent_white_35">#59ffffff</color>
<color name="transparent_white_40">#66ffffff</color>
<color name="transparent_white_45">#73ffffff</color>
<color name="transparent_white_50">#80ffffff</color>
<color name="transparent_white_55">#8Cffffff</color>
<color name="transparent_white_60">#99ffffff</color>
<color name="transparent_white_65">#A6ffffff</color>
<color name="transparent_white_70">#B3ffffff</color>
<color name="transparent_white_75">#BFffffff</color>
<color name="transparent_white_80">#CCffffff</color>
<color name="transparent_white_85">#D9ffffff</color>
<color name="transparent_white_90">#E6ffffff</color>
<color name="transparent_white_95">#F2ffffff</color>
Now i show you how to make any color as a transparent color in percentage(%).
- 100% — FF
- 99% — FC
- 98% — FA
- 97% — F7
- 96% — F5
- 95% — F2
- 94% — F0
- 93% — ED
- 92% — EB
- 91% — E8
- 90% — E6
- 89% — E3
- 88% — E0
- 87% — DE
- 86% — DB
- 85% — D9
- 84% — D6
- 83% — D4
- 82% — D1
- 81% — CF
- 80% — CC
- 79% — C9
- 78% — C7
- 77% — C4
- 76% — C2
- 75% — BF
- 74% — BD
- 73% — BA
- 72% — B8
- 71% — B5
- 70% — B3
- 69% — B0
- 68% — AD
- 67% — AB
- 66% — A8
- 65% — A6
- 64% — A3
- 63% — A1
- 62% — 9E
- 61% — 9C
- 60% — 99
- 59% — 96
- 58% — 94
- 57% — 91
- 56% — 8F
- 55% — 8C
- 54% — 8A
- 53% — 87
- 52% — 85
- 51% — 82
- 50% — 80
- 49% — 7D
- 48% — 7A
- 47% — 78
- 46% — 75
- 45% — 73
- 44% — 70
- 43% — 6E
- 42% — 6B
- 41% — 69
- 40% — 66
- 39% — 63
- 38% — 61
- 37% — 5E
- 36% — 5C
- 35% — 59
- 34% — 57
- 33% — 54
- 32% — 52
- 31% — 4F
- 30% — 4D
- 29% — 4A
- 28% — 47
- 27% — 45
- 26% — 42
- 25% — 40
- 24% — 3D
- 23% — 3B
- 22% — 38
- 21% — 36
- 20% — 33
- 19% — 30
- 18% — 2E
- 17% — 2B
- 16% — 29
- 15% — 26
- 14% — 24
- 13% — 21
- 12% — 1F
- 11% — 1C
- 10% — 1A
- 9% — 17
- 8% — 14
- 7% — 12
- 6% — 0F
- 5% — 0D
- 4% — 0A
- 3% — 08
- 2% — 05
- 1% — 03
- 0% — 00
To make any transparent color by using above value which is show transparent level of color. let we take a example to convert solid white color convert in 40% transparent,
- Solid white color "#FFFFFF" to Transparent color "#66FFFFFF"
- Solid Black color "#000000" to Transparent color "#80000000"
I hope this tutorial may helpful for you.
This blog presented itself in a very easy and clear way. Owner of this blog found a very simple way to express its view but when you read this blog completely, you would get to know about how hard it could be to express such in a easy way.เสริมดั้ง
ReplyDeleteThank you for this may god bless you
ReplyDeletethank you <3
ReplyDeletethank you so much <3
ReplyDelete