Research/HTML

HTML_colors

RIEM 2023. 5. 2. 18:55

 

HTML Colors

HTML colors can be defined with predetermined color names, or with BGB, HSL, RGBA, or HSLA values.

RGB and RGBA Colors

An RGB color value is consisted of Red, Green, and Blue light sources.

An RGBA color value is an extension of RGB with an Alpha channel which is opacity.

 

RGB = Red + Green + Blue

RGBA = Red + Green + Blue +Alpha

RGB Color Values

RGB value can be defined by using this formula: rgb(red, green, blue). Each parameter specifies the intensity of the color with a value between 0 and 255. 

 

You can create different shades of Gray with 3 equal values.

 

 

RGBA Color Values

 

rgba(red, green, blue, alpha) which is RGBA’s color value can be displayed like this.

 

 

HEX Color Values

In HTML, a color can be defined using a hexadecimal value in the form: #rrggbb.

rr is red, gg is green, and bb is blue. 

If you see ‘ff’, it means the highest value of the color.

 

HTML HSL and HSLA Colors

HSL stands for hue, saturation, and lightness. And you know what A means in HSLA? It’s alpha for opacity.

HSL Color values can be described with numbers. A range of each degree is like this.

 

Hue : 0 - 360

Saturation : 0 - 100%

Lightness : 0 - 100%

 

 

Saturation is the intensity of a color.

 

 

The lightness of a color means how much light you give the color. 

 

The Shades of color can be describe like this.