liveBook · Manning

Brightness

As explained in Web Design Playground, Second Edition

Lightness is the degree to which a color appears light or dark, commonly expressed as a percentage.

Brightness, called lightness in HSL colors, describes how light or dark a color appears. It is a percentage: 0% produces black, 100% produces white, and higher values make a color lighter. Think of it as a light-to-dark control for the color you have chosen. section 17.1

Figure 17.4 Lightness measures how dark or light a color appears. The color wheel shown previously in Figure 17.3 is set to 50% lightness. Higher percentages produce lighter colors, and lower percentages produce darker colors.

Compare the colors at different lightness settings: lower percentages look darker, while higher percentages look lighter. section 17.1

Set lightness in CSS

Try `h1 { color: hsl(300, 100%, 25%); }`. In `hsl()`, the three values set hue, saturation, and lightness, in that order. Here, `25%` is the lightness of the purple heading text. Change that last percentage and see what happens—no color-wheel gymnastics required. section 17.4

Want to choose by eye instead? In the Web Design Playground’s Color Chooser, drag vertically in the large color box to adjust lightness and see the resulting color and CSS code. Lightness also helps make a monochrome color scheme: the Color Scheme Calculator can generate colors with one hue but different saturation and lightness values. section 17.5 section 17.7

How Web Design Playground, Second Edition covers it

How deep it goes
Defines lightness as a percentage and demonstrates its position in hsl(), without exploring color calculations.
Examples
Shows a purple CSS heading, a visual lightness comparison, and a Color Chooser control.
What it assumes
Introduces hue, saturation, and lightness before demonstrating hsl() syntax.
What you can do after
Apply it via CSS hsl() or the Color Chooser to make a selected color lighter or darker.
How it connects
Links lightness to hue, saturation, HSL colors, and monochrome color schemes.

Also explained in

Compare how 7 books explain brightness →

Related concepts

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