CSS3 Colors CSS3

What are CSS3 Colors?

CSS3 supports extra color properties as folloshown below −

  • RGBA colors
  • HSL colors
  • HSLA colors
  • Opacity

RGBA abbreviates for Red Green Blue Alpha. It is an extension of CSS2 colors,Alpha specifies the opacity of a color and parameter number is a numerical between 0.0 to 1.0.

A Sample syntax of RGBA is shown below −

HSL abbreviates for hue, saturation, lightness.

Here, Huge is a degree on the color wheel, saturation and lightness are the percentage values between 0 % to 100%.

A Sample syntax of HSL is shown below −

HSLA abbreviates for hue, saturation, lightness and alpha. Alpha value defines the opacity as shown RGBA.

A Sample syntax of HSLA is shown below −

opacity is a thinner paints need black added to add opacity.

A sample syntax of opacity is as shown below −

The below example shows rgba color property

It will produce the following result −

What are CSS3 Colors

The below example shows HSL color property

It will produce the following output −

output

The below example shows HSLA color property

It will produce the following output −

HSLA colors

The below example explains the Opacity property

It will produce the following result −

HSLA colors

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

CSS3 Topics