I would like some clarification on what the code in front of the HTML color code is called and how it functions.
1) I'm assuming, in the example below, the endColor
of #00000000
with the two preceding 00
tells the color to be generated more transparent than say FF
.
2) But what's the scale?
3) Is there some kind of hex scale that equates to certain percentages?
I'm really confused and can find no documentation because I'm not even sure of the the terminology I should be searching for other than 'xml transparent gradient' which doesn't tell me what I want to know.
Any/All help is appreciated. Thanks
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#DD63594A"
android:endColor="#00000000"
android:angle="90"/>
<padding android:left="4dp"
android:top="1dp"
android:right="4dp"
android:bottom="1dp" />
<corners android:bottomRightRadius="1dp" android:bottomLeftRadius="1dp"
android:topLeftRadius="7dp" android:topRightRadius="7dp"/>
</shape>
It's hexadecimal. The scale is the same as the RGB values in the rest of the color code, so 00
would be alpha=0
and FF
would be alpha=255
. Basic math explains the rest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With