With CSS, you can give color names, hexadecimal and RGB (Red, Green, Blue) values. In addition, CSS3 also introduces RGBA (Red, Green, Blue, Alpha) colors, HSL (Hue, Saturation, Lightness) colors, HSLA colors and opacity.

RGBA Colors

RGBA color values are extension of RGB color values with an alpha value, which specifies the opacity for a color. An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

HSL Colors

HSL stands for Hue, Saturation and Lightness. HSL color value is specified with: hsl(hue, saturation, lightness).

Hue is a degree on the color wheel (from 0 to 360). 0 (or 360) is red, 120 is green, and 240 is blue.

Saturation is a percentage value - 100% is the full color. Lightness is also a percentage - 0% is dark (black) and 100% is white.

HSLA Colors

HSLA color values are an extension of HSL color values with an alpha valve, which specifies the opacity for a color. An HSLA color value is specified with: hsla(hue, saturation, lightness, alpha)

The alpha parameter defines the opacity. The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).