0

I'm trying to understand why 88 or 8 for alpha in a hex color outputs a color that's 50% transparent?

for example, #33AA3388 or #3a38 outputs a 50% transparent green color.

I know in the base-16 hexadecimal number system the decimal value 8 translates to the hex value 8. Does this have to do with it?

I would appreciate a simple answer. Thanks.

LVX-001
  • 56
  • 9
  • from 0 to 16 the 50% is 8 (to be exact it's the 53.33%) – Temani Afif Jan 26 '20 at 00:49
  • what operation can I use to to find the exact value? I tried 8/16 which is 0.5. thanks. – LVX-001 Jan 26 '20 at 01:03
  • check the duplicate to get the accurate formula – Temani Afif Jan 26 '20 at 01:11
  • I followed the formula in the 'Convert 8-digit hex colors to rgba colors? ' thread but I didn't get 53.33%. got 50.19% for for a hex of 8 – LVX-001 Jan 26 '20 at 04:00
  • maybe I did a mistake somewhere, I wasn't really focused but at least you know why 8 is giving you something around 50% – Temani Afif Jan 26 '20 at 10:19
  • Actually if I follow the formula like so, step 1. 8 * 16^1 = 128, step 2. 8*16^0 = 8. step 3. 128 + 8 = 136. step 4 136/255 = 0.5333... then if you move it two decimal places two the right it becomes 53.33%. when using 8 digit hex like so #33AA3388. With #3A38 it would be around %50.19 opacity. Thanks. – LVX-001 Jan 27 '20 at 08:07

0 Answers0