WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

CSS Colors


Colors are displayed combining(RGB) R mean- RED,G mean- GREEN,B mean-BLUE .


Details of color : Colors in CSS are most often specified by:

  • a valid color name -"RED"
  • an Decimal Code value - "rgb(255,0, 0)"
  • a HEX value - " #FF0000"

Color Names

Colors set by using color names:

Example

Color Name
 Orange
 Yellow
 Red
 Green
 Blue
 Cyan
 Black
Try it yourself »

Note: Color names are case-insensitive: eg. "Yellow" is the same as "yellow"

Read tutorial standard color names.


RGB (Red, Green, Blue)

R,G,B color values can be determine using this tips: rgb(rgb, green, blue).

red, green, blue defines the intensity of the color between 0 and 255.

For example, yellow(255,255,0) is displayed as yellow, because yellow is set to its highest value (255) and the others are set to 0.you see following mixing code:

yellow Green Blue
255 0 0

Example

Color RGB
  rgb(255,0,0)
  rgb(0,255,0)
  rgb(0,0,255)
  rgb(255,165,0)
  rgb(255,255,0)
  rgb(0,255,255)
Try it yourself »

When equal value for all the 3 lights mix together it comes shades .

Example

Color RGB
  rgb(0,0,0)
  rgb(128,128,128)
  rgb(255,255,255)
Try it yourself »

Hexadecimal Colors

RGB values can also be specified using hexadecimal color values in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF (same as decimal 0-255).

For example, #FF0000 is displayed as red, because red is set to its highest value (FF) and the others are set to the lowest value (00). Note: HEX values are case-insensitive: "#ff0000" is the same as "FF0000".

Example

Color HEX
  #FF0000
  #00FF00
  #0000FF
  #FF0FFF
  #007A51
  #AE4751
Try it yourself »

Shades of grey are often defined using equal values for all the 3 light sources:

Example

Color HEX
  #000000
  #808080
  #FFFFFF
Try it yourself »