Similar to rgb() notation, but with an additional alpha (opacity) value.
.red {
/* Opaque red */
color: rgba(255, 0, 0, 1);
}
.red-50p {
/* Half-translucent red. */
color: rgba(255, 0, 0, .5);
}
rgba(<red>, <green>, <blue>, <alpha>);
Value | Description |
---|---|
<red> | an integer from 0 - 255 or percentage from 0 - 100% |
<green> | an integer from 0 - 255 or percentage from 0 - 100% |
<blue> | an integer from 0 - 255 or percentage from 0 - 100% |
<alpha> | a number from 0 - 1, where 0.0 is fully transparent and 1.0 is fully opaque |