liveBook · Manning

Color property

As explained in Web Design Playground

A visual property describing the perceived hue, shade, or tint applied to text or other rendered content.

Want a heading to look red? The CSS color property sets an element’s text color. It changes the letters, not the area behind them; background-color handles that. section 4.32

Color a heading

h1 { color: hsl(0, 100%, 50%); } Here, h1 selects headings, color names the property, and the hsl() value specifies red. The braces hold the rule; the colon and semicolon separate its parts. Try changing the value to hsl(180, 100%, 50%) to make the text cyan. section 1.17 section 17.15

Color choices also shape how a page feels. For a simple starting point, use two or three colors rather than a dozen. You can use one as the main hue and another as an accent. section 17.15

How Web Design Playground covers it

How deep it goes
Identifies color as the text-color property and explains declaration syntax, without detailing how the browser renders colors.
Examples
Uses red and cyan HSL values and a heading rule to illustrate a possible text-color change.
What it assumes
Introduces selectors, properties, and values from the basics while working with web-page elements.
What you can do after
Operate/configure it by assigning a CSS color value to selected text and choosing a restrained page palette.
How it connects
Connects color to CSS selectors, declarations, background-color, and harmonious color schemes.

Also explained in

Compare how 2 books explain color property →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground. The section links point to the parts of the book it draws on.