HTML - Color

In HTML a color can be specified by using :

      Color Name ex. Green.

      RGB Value ex. rgb(0,255,0).

      HEX Value ex. #fff.


Color Name

In this method set color using it's name like red,green and other color the following simple syntax of using color name

Syntax


<h2 style="background-color:red;">This Color By Name - Red</h2>
<h2 style="background-color:green;">This Color By Name - Green</h2>
							

Color

Name

Orange

Red

Green

Yellow

Blue


RGB Value

In this method set color using it's rgb value like rgb(0,255,0) and other color rgb value the following simple syntax of using color rgb value.

Syntax


<h2 style="background-color:rgb(255,0,0);">This Color</h2>
<h2 style="background-color:rgb(255,140,0);">This Color</h2>
							

Color

Name

rgb(255,140,0)

rgb(255,0,0)

rgb(0,128,0)

rgb(255,255,0)

rgb(0,0,255)


HEX Value

In this method set color using it's HEX value like #FFF and other color HEX value the following simple syntax of using color HEX value.

Syntax


<h2 style="background-color:#FF8C00;">This Color</h2>
<h2 style="background-color:#FF0000;">This Color</h2>
							

Color

Name

#FF8C00

#FF0000

#008000

#FFFF00

#0000FF


For More Color Visit Color Picker  

Share Share on Facebook Share on Twitter Share on Google+ Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit