CSS - RGBA

About

CSS - RGB Color Definition with an opacity parameter. New in css3.

Example

div { 
    width: 50px;
    height: 50px;
    float: left;
    margin-bottom: 10px;
}
Palette of Red with Alpha:
<p style="clear:both"></p>
<div style="background: rgba(255, 0, 0, 0.2);"></div>
<div style="background: rgba(255, 0, 0, 0.4);"></div>
<div style="background: rgba(255, 0, 0, 0.6);"></div>
<div style="background: rgba(255, 0, 0, 0.8);"></div>
<div style="background: rgba(255, 0, 0, 1) ;"></div>
<p style="clear:both"></p>
Palette of Red without Alpha:
<p style="clear:both"></p>
<div style="background: rgb(243, 191, 189);"></div>
<div style="background: rgb(246, 143, 142);"></div>
<div style="background: rgb(249, 95 , 94) ;"></div>
<div style="background: rgb(252, 47, 47) ;"></div>
<div style="background: rgb(255, 0, 0) ;"></div>

Documentation / Reference





Discover More
Color - RGB (Red Green Blue Additive Model)

Red Green Blue (RGB) is a color space (model) that specify a color by setting the amount of each of its three primary colors Red, Green, Blue (RGB). Red Green Blue is an additive model where primary...
Card Puncher Data Processing
SVG - Opacity (Transparency or Alpha)

Transparency (opacity) can be applied by setting: a RGB color with alpha, or the opacity css attribute value. The stylesheet: The circle: The stylesheet: The circle:



Share this page:
Follow us:
Task Runner