Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the color code for transparency in CSS?

Can anyone tell me what is the color code for transparency in CSS like white = "#FFFFFF"? As I am using following code, to convert the color codes into int:

Color color = ColorTranslator.FromHtml(hex);
return (int)((color.R << 16) | (color.G << 8) | (color.B << 0));
like image 942
Safran Ali Avatar asked Oct 21 '11 15:10

Safran Ali


2 Answers

There is no hex code for transparency. For CSS, you can use either transparent or rgba(0, 0, 0, 0).

like image 158
Michael Mior Avatar answered Oct 25 '22 21:10

Michael Mior


Or you could just put

background-color: rgba(0,0,0,0.0);

That should solve your problem.

like image 34
anon Avatar answered Oct 25 '22 22:10

anon