Say you want to set the background color of something to black. In CSS, you might write something like:
But, what if you wanted the color to be less dark while showing whatever is underneath it like what you’d get by specifying 50% opacity in Photoshop. To do that, do the following:
The first 3 parameters are the red, green and blue values and the fourth is the alpha transparency from 0 to 1.