Kevin Powell

QUIZ TIME! Did you know that when declaring a colour with a hex code, you can provide it with 8 characters, and if you do, the last two are for the alpha value (opacity)? Well, you know now... and in knowing that, which of these would make an orange colour that has a 50% alpha value?

1 week ago | [YT] | 221



@IbrahimKwakuDuah

If the explanation for 80=120 is confusing. The easier explanation should be that HEX values are up to 16 on the decimal scale so 80 from a hexadecimal value to decimal is 8 x 16 + 0, therefore 128. Or the mental shortcut that 50% in the hexadecimals should be at 8, 0 always equals 0, therefore any number with 80 at the should win 😉

1 week ago (edited) | 19

@perpetualtechnoob

I really appreciate these little lessons! Keep’em coming! 👍

6 days ago | 0

@AmodeusR

whaat, I always thought that it received a percentage level, so puttin 10 would mean 10%, hence 50 would mean 50% xd

3 days ago | 0

@pierreroge608

Let me be pedantic! :D 7F is the middle of 00-FF :p

4 days ago | 0

@anshumankhanna8296

I didn't even do the mental calculations, I just know that 80 hex is going to give 50% because I remember using that value

1 week ago | 7

@prometheusvmorphs5183

How much does he knows??!

4 days ago | 0

@JosephCodette

For simple gray shadows I use fff5 sometimes

1 week ago | 2

@Britney.J

Did not know!! Thank you for the pro tip!

1 week ago | 0

@Musiken

Huh that explains why it’s never the opacity I expect it to get.

5 days ago | 0

@ivanaandersson

Just learned it recently!

1 week ago | 0

@yassine-sa

My brain still can't understand why it's not F0 or 0F, depending on the endianess

1 week ago | 1

@klakola3662

🤯

5 days ago | 0

@slimak1278

How to calculate that? How to calculate what hex code equals which opacity?

6 days ago (edited) | 0

@JohnCamacho

Is there an easy way to convert the tinted alpha color to a solid color?

1 week ago | 0

@dncdncd

I got it right, it's good to know, but this notation sucks. Don't use it and keep your code readable

6 days ago | 1

@blazingelse9104

I use #bab0 for transparency when fiddling. I was searching for some "word" I could use when aiming for few characters in cssbattle.

6 days ago | 0

@alexnone

88 must be, not 80

6 days ago | 0

@ss-pk5fy

Just knowing hex I gave the right answer xD

6 days ago | 0