CSS COLORS

Lavanya

CSS COLORS :

The color of HTML components can be set using the CSS Color property. You can set the text color, background color, etc. with this attribute.

Methods of css colors :

* Hexadecimal

* RGB 

* RGBA

* HSL

* HSLA

1. Hexadecimal:

In our css while developing a web page with using this colors red, blue, orange, black.the hexadecimal is one of the way to developing a colors in html . Hexadecimal method like #R G B.

R means red color -its range between 00 to ff.

G means green color- similarly its range between 00 to ff.

B means blue color- similarly its range between 00 to ff.

Example:

We take a elements from red,green, blue .Takes the first 2 values in the each colors seperately.

#000000 it will represent a black color.

#ffffff it will represent a white color.

#Abcd34 this is a combination all colors (red,green,blue)represent one color(any color).

2. RGB :

RGB function which take the three parameters the first one is represent the red , second one is represent the green and the last one is represent the blue this is also numberical but this function will take 3.

* Red- range from 0 to 225.
* Green- range from 0 to 225.
* Blue - range from 0 to 225.

Example :
RGB(100,200,150)red represent 100,green represent 200 and blue represent 150. Combination of all this three representing the colors.

3.RGBA:

RGB function with alpha (red,green, blue,alpha)
this function is similarly like a RGB function but it have the alpha . Alpha is transparency/opacity.

* Red- range from 0 to 225.
* Green- range from 0 to 225.
* Blue - range from 0 to 225.
* But this alpha represent 0.0to1.0.
   0.0- is completly transparency.
   1.0- is non transparency .

4.HSL:

HSL means hue, saturation, lightening this also one of the method to developing the colors in html .
* Hue is a combination of all this r,g,b the range is 0 to 360 is a color combination.
* Saturation range is 0% to 100% and this colour is gray shade.
* Lightening range is also 0% to 100% and this color is light to dark.

5.HSLA:

HSLA function is similarly like a HSL function but it have the alpha .The Alpha representing the transparency or opacity.

*The range is 0 to 360.
* This alpha represent 0.0to1.0.
   0.0- is completly transparency.
   1.0- is non transparency .












Tags
Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send