Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opacity in Hex colors of CSS [duplicate]

Tags:

css

How to apply opacity in Hex colors ?

I am working with CSS Hex colors. I am trying to apply opacity in Hex colors. I need #78909c with opacity 0.2.

like image 749
abu abu Avatar asked Aug 31 '25 04:08

abu abu


1 Answers

The hex representation of colors supports the alpha channel to set opacity.

so, take any color in hex e.g. #ffffff and append 00 to ff (in hexadecimal representation) for opacity, i.e. #ffffff00 - #ffffffff

for your color: #78909c33

20% implies 33 in hex

Here is a demo

Reference: Hexadecimal notation

like image 120
Neetigya Chahar Avatar answered Sep 02 '25 18:09

Neetigya Chahar