concept palette in category css

appears as: A palette, palette
CSS in Depth

This is an excerpt from Manning's book CSS in Depth.

A palette will typically have one primary color that everything else is based on. It’s often derived from the corporate branding or logo. In our page, this is the brand green color (top, left in the figure). Other colors in the palette will often be varying shades of the same hue, or complementary colors to it. Most palettes also have a black, a white (though they may not be pure #000000 or #ffffff), and a handful of grays.

12.2.2. Adding new colors to a palette

Occasionally, you’ll find you’ll need a color that your designer didn’t plan for. Maybe you need a red error message or a blue informational box. Experienced designers usually account for common instances like this, but you may still find yourself in a situation where you need to add to the palette.

Listing 12.7. Adding the red color to the palette
html { --brand-green: hsl(162, 87%, 21%); --dark-green: hsl(162, 88%, 30%); --medium-green: hsl(162, 73%, 46%); --text-color: hsl(210, 11%, 15%); --gray: hsl(210, 7%, 56%); --light-gray: hsl(210, 17%, 95%); --extra-light-gray: hsl(210, 17%, 98%); --white: hsl(0, 0%, 100%); --red: hsl(342, 63%, 46%); 1 box-sizing: border-box; color: var(--text-color); } ... a:active { color: var(--red); 2 }