CSS Colors

CSS Colors

CSS Colors

In CSS Colors are specified using👇 image.png

via GIPHY

1. Predefined color names

👉 In CSS, a color can be specified by using a predefined color name.

👉 CSS/HTML support 140 standard color name . some are👇 image.png

Example👇 image.png

An RGB color value represents RED, GREEN, and BLUE light sources.

some of them are given below👇 image.png

2. CSS RGB Colors

Example👇 image.png

via GIPHY

3. CSS HEX Colors

A hexadecimal color is specified with **#RRGGBB**, where the RR (red), GG (green), and BB (blue) hexadecimal integers identify the components of the color.

some of them are given below👇

image.png

Example👇 image.png

4. CSS HSL Colors

👉 HSL stands for hue, saturation, and lightness.

HSL Value

👉 In CSS, a color can be specified using hue, saturation, and lightness (HSL) in the form:

hsl (*hue*, *saturation*, *lightness*)

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

👉 Saturation is a percentage value. 0% means a shade of gray, and 100% is the full color.

👉 Lightness is also a percentage. 0% is black, 50% is neither light or dark, 100% is white.

some of them are 👇 image.png

Example👇 image.png

5. RGBA Color Value

👉 RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity for a color.

👉 An RGBA color value is specified with:

rgba(*red,* *green*, *blue, alpha*)

👉 An alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not transparent at all)

Example👇 image.png

6. HSLA Value

👉 HSLA color values are an extension of HSL color values with an alpha channel - which specifies the opacity for a color.

👉 An HSLA color value is specified with:

**hsla(*hue,* *saturation*, *lightness, alpha*)**

👉 An alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not transparent at all):

Example👇 image.png

via GIPHY


image.png> Download our HTML & CSS Visual Treat! ebook Here: Click here

Â