Color Values Method problem

Source: Internet
Author: User
Tags range version

CSS color values, everyone for the CSS2 version of the following color names, hex techniques, RGB notation.

The above take the value notation everybody and you are familiar with, CSS3 and what is more alternative method of taking value?

The three heroes of RGBA, HSL and Hsla are what we wait to see. CSS3 color method.

RGBA

That is, in the CSS2 version, the RGB notation adds elements that support transparency, and syntax is fairly easy to understand: RGBA (255,0,0,0.5), where the transparency is, the range of values is 0-1.

Hsl

Played PS children's shoes should be very familiar to this HSL, in turn, the meaning of the expression is:

H:hue (hue). 0 (or 360) indicates red, 120 is green, 240 is blue, and other values are required to specify the color. The value is: 0-360, in fact its unit is the degree

S:saturation (saturation). Values are: 0%-100%

L:lightness (brightness). Values are: 0%-100%

Syntax: HSL (207,38%,47%)

HSLA

This is also added on the basis of HSL to support the transparency of the elements, where the transparency, the value side range of 0-1. Syntax: HSL (207,38%,47%,0.5)

These basic color value syntax must be kept in mind, if you have any questions to the forum to ask questions



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.