>> English << | česky | PortuguêsZVON > Tutorials > CSS2 tutorial
>> Example 18 << | Prev | Next | Index | Contents

Colors can be also specified by their RGB value. This value specifies the ratio of red, green and blue in the composite color, respectively. The ratio can be given in several notations and it is usualy selected by a color picker, (1) shows a few examples in hexadecimal notation, the highest value is FF (255 in decimal), the lowest 0.

XML SourceCSS stylesheetExample link
(1)
     <AAA>
          <black>#000000</black>
          <white>#FFFFFF</white>
          <red>#FF0000</red>
          <green>#00FF00</green>
          <blue>#0000FF</blue>
          <color>#AA4488</color>
     </AAA>

AAA {background-color: #AAAAAA}

black {color:#000000}
white {color:#FFFFFF}
red {color:#FF0000}
green {color:#00FF00}
blue {color:#0000FF}
color {color:#AA4488}
View output