• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. CSS Optimization > Optimize CSS Colors

Optimize CSS Colors

You can specify colors five ways in CSS; four use numeric RGB values and one uses named colors. The two most efficient ways to specify colors are hexadecimal and named colors. Hexadecimal colors take two forms: RGB triplets and shorthand. Here's an example:

h1 { color: #ff0000 }           /* hexadecimal   #rrggbb */ 
h1 { color: #f00 }              /* shorthand hex #rgb */


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint