CSS Legal Color Values | background color value
![CSS Legal Color Values](https://i.imgur.com/axBPWDg.jpg)
CSSColorsColorsinCSScanbespecifiedbythefollowingmethods:HexadecimalcolorsHexadecimalcolorswithtransparencyRGBcolorsRGBAcolorsHSLcolorsHSLAcolorsPredefined/Cross-browsercolornamesWiththecurrentcolorkeywordHexadecimalColorsAhexadecimalcolorisspecifiedwith:#RRGGBB,wheretheRR(red),GG(green)andBB(blue)hexadecimalintegersspecifythecomponentsofthecolor.Allvaluesmustbebetween00andFF.Forexample,the#0000ffvalueisrenderedasblue,becausethebluecomponentissettoitshighestvalue(ff)andtheothersaresetto00.Exa...
![CSS Legal Color Values](http://pix4.agoda.net/hotelimages/4172139/0/24097f8fc1c9959ea5062e8d6497eaad.jpg?s=800x)
Colors in CSS can be specified by the following methods:
Hexadecimal colors Hexadecimal colors with transparency RGB colors RGBA colors HSL colors HSLA colors Predefined/Cross-browser color names With the currentcolor keyword Hexadecimal ColorsA hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF.
For example, the #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00.
ExampleDefine different HEX colors:
#p1 {background-color: #ff0000;} /* red */#p2 {background-color: #00ff00;} /* green */#p3 {background-color: #0000ff;} /* blue */
Try it Yourself »[1] Hexadecimal Colors With TransparencyA hexadecimal color is specified with: #RRGGBB. To add transparency, add two additional digits between 00 and ...
取得本站獨家住宿推薦 15%OFF 訂房優惠
本站住宿推薦 20%OFF 訂房優惠,親子優惠,住宿折扣,限時回饋,平日促銷
<color> - CSS | background color value
background | background color value
background-color - CSS | background color value
background-color | background color value
CSS background | background color value
CSS Backgrounds | background color value
CSS Colors | background color value
CSS Legal Color Values | background color value
CSS: background | background color value
HTML Background Color — HTML Color Codes | background color value
HTML Color Codes | background color value
![](https://i.imgur.com/axBPWDg.jpg)