CSS Colors | css colors codes - codewithrandom

CSS Colors | css colors codes - codewithrandom

CSS Colors | css colors codes - codewithrandom

CSS colors are commonly specified using the following:

  • Color Name
  • Hexadecimal Color Value
  • RGB Color Value

Color Name

It defines any valid color by its color name e.g.Red , Green , Blue, etc.

Example:

 .color-name {  
   color:red;  
 }  

Hexadecimal Color Value

Also known as Hex Color Value. It defines any valid color by a hash followed by letters and/or numbers e.g. #00FF00,etc.

Example:

 .hex-code {  
   color: #00ff00;  
 }  

RGB Color Value

RGB stands for Red, Green and Blue. It defines any valid color using the rgb() . CSS function by this format: rgb( value1 , value2 , value3 )e.g. rgb(124,252,0) .

Note: The <value> should only be from 0 to 255.

The Values represent the intensity of the red, green and blue colors in that particular order.

Example:

 #rgb-color {  
   color: rgb(0, 0, 255);  
 }  

Most Common CSS Colors with Color Name, Hex and RGB Color Values

ColorColor NameHex Color ValueRGB Color Value
White#ffffffrgb(255, 255, 255)
Silver#C0C0C0rgb(192, 192, 192)
Gray#808080rgb(128, 128, 128)
Black#000000rgb(0, 0, 0)
Red#ff0000rgb(255, 0, 0)
Maroon#800000rgb(128, 0, 0)
Yellow#ffff00rgb(255, 255, 0)
Olive#808000rgb(128, 128, 0)
Lime#00ff00rgb(0, 255, 0)
Green#008000rgb(0, 128, 0)
Aqua#00ffffrgb(0, 255, 255)
Teal#008080rgb(0, 128, 128)
Blue#0000ffrgb(0, 0, 255)
Navy#000080rgb(0, 0, 128)
Fuchsia#ff00ffrgb(255, 0, 255)
Purple#800080rgb(128, 0, 128)

Post a Comment

Previous Post Next Post