web site optimization


Website performance news and views™

Home Sitemap Issues About Contact
Free newsletter
buy website optimization secrets book cover

New book on Website Optimization Secrets

Free Newsletter
Enter email:

home > issues > 29

CSS: Use Shorthand Hex Colors

Optimization Week Issue #29, June 14, 2004

In this week's Speed Tweak we show how to use shorthand hex notation to abbreviate triple-paired colors. Shorthand hex colors are yet another tool in your optimization toolbox. Combined with other techniques like shorthand properties, descendant selectors, and grouping, shorthand hex colors can help you optimize your CSS to the bare minimum.

CSS: Use Shorthand Hex Colors
Shorthand hex notation substitutes 3-character color values for 6-character colors when each of the color channels is identical in an RRGGBB hex triplet. Shorthand hex colors can help optimize your style sheets, especially when combined with shorthand properties and grouping.