Use the below code for black:
(将以下代码用于黑色:)
<color name="black">#000000</color>
Now if I want to use opacity then you can use the below code:
(现在,如果我要使用不透明度,则可以使用以下代码:)
<color name="black">#99000000</color> <!-- 99 is for alpha and others pairs zero's are for R G B -->
And below for opacity code: and all opacity level here
(以下是不透明度代码:以及此处的所有不透明度级别)
Hex Opacity Values (十六进制不透明度值)
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
50% — 80
45% — 73
40% — 66
35% — 59
30% — 4D
25% — 40
20% — 33
15% — 26
10% — 1A
5% — 0D
0% — 00
If you always to forget what code for transparency then you must have to see below link and no worry about to remember anything regarding transparent code :-
(如果您始终忘记透明的代码,则必须查看以下链接,而不必担心记住任何有关透明代码的内容:)
https://github.com/duggu-hcd/TransparentColorCode
(https://github.com/duggu-hcd/TransparentColorCode)
textviewHeader.setTextColor(Color.parseColor(ColorTransparentUtils.transparentColor10(R.color.border_color)));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…