A029g11

RGBa Colors

Guide:

#container
{
background-color:rgba(209, 226, 250, .5);
}

in other words:

#container
{
background-color: rgba(red, green, blue, alpha); 
}

CSS3 allows you to utilize colors using RGBa instead of Hex Colors (#FF00FF).  RGBa stands for Red, Green, Blue, and alpha. Alpha is used for alpha transparency. Screen colors are made by using light, by combining red, green, and blue, you can create 16,777,216 colors.

To make colors with RGBA, you specify colors with three values from 0 to 255.  The last value is the alpha value. The first value is the red, the second value is the green, the third value is the blue, and the last value is the alpha (between 0 and 1).

For example:

rgba(255, 0, 0,1) is red

rgba(0, 255, 0, 1) is green

rgba(0, 0, 255, 1) is blue

alpha (transparency) takes values from 0 to 1, therefore

rgba(255, 0, 0,1) is fully opaque (not transparent)

rgba(255, 0, 0,.5) is 50% transparent

rgba(255, 0, 0,0) is fully transparent