I'm studying how to express colors on Android. I gave the background color to the linear layout as shown below. If you test it, there's a bit of transparency in gray.
<gradient android:startColor="#b4555555" android:endColor="#b4555555"
android:angle="270.0" />
If I erase the last two digits (55), the transparent ones disappear. I don't quite understand why. It's like a beginner's question. Please let me know.
android hex color transparency
When you give the color value, if you give 6 digits, it becomes RGB value. (Double digits represent red, green, blue.)) And if you give it to 8 digits, it becomes ARGB value (two digits represent transparency, red, green, and blue)
So if you first erase the last two digits from A=B4, R=55, G=55, B=55, then you get R=B4, G=55, B=55.
© 2024 OneMinuteCode. All rights reserved.