CSS Color Values
List of color values that can be used with CSS.
CSS provides multiple ways of specifying a color value when applying color to web pages and other documents. For example, can use a color name, an RGB value, an HSL value, and more.
Here's a list of color values that can be used with any of the CSS properties that accept a color value.
Here are some quick examples of the various color values.
hsl() function allows you to create colors by specifying the hue, saturation, and lightness levels.
Same as the
hsla() function, but allows you to create a transparent color by using a fourth value. The fourth value represents the alpha channel of the color.
rgb() function lets you create a color by adding varying amounts of red, green, and blue together.
rgba() function is the same as the RGB method, but allows you to create a transparent color by setting a fourth value. The fourth value represents the alpha channel.
Allows you to specify RGB colors using six-digit hexadecimal notation.
The three-digit notation is shorthand for the six-digit method.
The eight-digit hex notation is like the six-digit method, but it allows you to specify a transparent color by using a fourth color component, which specifies an alpha channel for the color.
The four-digit notation is shorthand for the eight-digit method.