how to get parseColor color value to transparent.
mPaint.setColor(Color.parseColor("#FFFF00"));
thanks for help
You can actually apply a hex code color that is transparent. The hex code for transparent white (not that the color matters when it is fully transparent) is two zeros followed by white's hex code of FFFFFF or 00FFFFFF.
On the Picture Format tab, select Color, and then select Set Transparent Color. Click the color in the picture or image that you want to make transparent. Note: You can't make more than one color in a picture transparent.
setAlpha(51); Here you can set the opacity between 0 (fully transparent) to 255 (completely opaque). The 51 is exactly the 20% you want.
When you have a 6 digit color code e.g. #ffffff, replace it with #ffffff00. Just add 2 zeros at the end to make the color transparent.
Suppose your preferred color is red #FF0000
Adding 00 in the beginning will make it 100% transparent and adding FF will make it 100% solid.
So, 100% transparent color is: #00ff0000
and 100% solid color is: #ffff0000
And any value in between 00
to ff
can be used to adjust the transparency.
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