CSS Colors

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

Details of shading : Hues in CSS are frequently determined by:

  • a substantial shading name - "RED"
  • an Decimal Code esteem - "rgb(255,0, 0)"
  • a HEX esteem - " #FF0000"

Color Names

Colors set by utilizing shading names:


Color Name
Try it yourself »

Note: Color names are case-unfeeling: eg. "Yellow" is equivalent to "yellow"

Read instructional exercise standard shading names.

RGB (Red, Green, Blue)

R,G,B shading esteems can be decide utilizing this tips: rgb(rgb, green, blue).

red, green, blue characterizes the force of the shading somewhere in the range of 0 and 255.

For model, yellow(255,255,0) is shown as yellow, since yellow is set to its most noteworthy esteem (255) and the others are set to 0.you see following blending code:

yellow Green Blue
255 0 0


Color RGB
Try it yourself »

When meet an incentive for all the 3 lights combine it comes shades .


Color RGB
Try it yourself »

RGBA (Red, Green, Blue, Alpha)

RGBA shading esteems are an expansion of RGB shading esteems with an alpha channel - which indicates the opacity of the color.

An RGBA shading esteem is indicated with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (completely straightforward) and 1.0 (completely opaque).


Color RGBA
Red with 20% opacity rgba(255, 0, 0, 0.2)
Red with 40% opacity rgba(255, 0, 0, 0.4)
Red with 70% opacity rgba(255, 0, 0, 0.7)
Red rgb(255, 0, 0)

Note: RGBA shading esteems are bolstered in all programs, aside from IE8 and prior. Nonetheless, you can proclaim a fallback shading for IE8 and prior, utilizing rgb instead:


div {
    foundation shading: rgb(255, 0, 0);/* Fallback shading (no murkiness) */
    foundation shading: rgba(255, 0, 0, 0.4);

Hexadecimal Colors

RGB qualities can likewise be indicated utilizing hexadecimal shading esteems in the structure: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values among 00 and FF (same as decimal 0-255).

For precedent, #FF0000 is shown as red, since red is set to its most noteworthy esteem (FF) and the others are set to the most reduced esteem (00). Note: HEX qualities are case-obtuse: "#ff0000" is equivalent to "FF0000".


Color HEX
Try it yourself »

Shades of dim are frequently characterized utilizing break even with qualities for all the 3 light sources:


Color HEX
Try it yourself »

HSL (Hue, Saturation, Lightness)

HSL represents tint, immersion, and daintiness - which speaks to a round and hollow facilitate portrayal of hues, and is determined with: hsl(hue, immersion, lightness).

Hue is a degree on the shading wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. Immersion is a rate esteem; 0% implies a shade of dim and 100% is the full shading. Gentility is likewise a rate esteem; 0% is dark, 100% is white.


Color HSL
  hsl(0, 100%, 50%)
  hsl(120, 100%, 50%)
  hsl(240, 100%, 50%)
  hsl(39, 100%, 50%)
  hsl(60, 100%, 50%)
  hsl(180, 100%, 50%)