A complementary color relationship pairs hues opposite each other on the color wheel. In hsl(), their hue values are 180 degrees apart. section 17.6
Use the relationship to create contrast without letting the colors wrestle for control:
- Choose one hue as the page’s main color and use its complement as an accent. section 17.6
- Reserve the accent for attention-grabbing elements such as Subscribe or Buy buttons. section 17.6
- Calculate a complement by adding or subtracting 180 degrees from the main hue. section 17.7
Red’s opposite
Red, hsl(0, 100%, 50%), pairs with hsl(180, 100%, 50%). One can carry the page while the other provides a bright accent. section 17.6
Figure 17.11 Use the Web Design Playground’s Color Scheme Calculator to generate a color scheme for a given RGB code.
Use the Color Scheme Calculator to generate complementary colors from an RGB value, hex triplet, rgb(), color keyword, or hsl() value. section 17.7




