CSS Colors

The color is combined by the display of red, green, and blue light.

color value

The color defined in CSS uses the hex notation for the combination of red, green, and blue color values. Can be the lowest value is 0 (hexadecimal 00) to the highest value is 255 (hexadecimal FF)

Hexadecimal value of 3 double digits, beginning with # symbol.

Color Names

In CSS, a color can be specified by using a color name:


Color Name
Try it yourself »

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

Read instructional exercise standard color names.

RGB (Red, Green, Blue)

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

red, green, blue characterizes the force of the color 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 value (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 color value are an expansion of RGB color value with an alpha channel - which indicates the opacity of the color.

An RGBA color value 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 color value are bolstered in all programs, aside from IE8 and prior. Nonetheless, you can proclaim a fallback color for IE8 and prior, utilizing rgb instead:


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

Hexadecimal Colors

RGB qualities can likewise be indicated utilizing hexadecimal color value 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 value (FF) and the others are set to the most reduced value (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 color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. Immersion is a rate value ; 0% implies a shade of dim and 100% is the full color. Gentility is likewise a rate value ; 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%)