Contrast
Contrast is the perceptual or measurable difference in visual properties, such as luminance or color, between elements or regions.
Design for Developers
Color contrast is the perceptual difference between colors that affects the separation, visibility, and readability of interface elements.
- How it is used
- Guides attention through a web page while keeping text and interface elements visible.
- How deep it goes
- Explains visual contrast through shape, color, and size, then gives practical checking and image-treatment steps without specifying numeric thresholds.
- Examples
- Uses white text on a bright photograph, a pale input field, and gradients or solid shapes behind image text.
- What you can do after
- Apply it via the WebAIM contrast checker to test color pairs early, then adjust colors or image treatments for readability.
CSS in Depth, Second Edition
Contrast is the visual difference between colors or other visual properties that makes adjacent content distinguishable.
- How it is used
- Directs attention toward key page actions and away from low-priority content when implementing a page design.
- How deep it goes
- Defines contrast through pattern-breaking, demonstrates CSS-based emphasis, and gives WCAG text ratios while noting that ratios do not fully determine readability.
- Examples
- Uses a prominent slogan and button, a muted footer, and same-color paragraphs set in normal and thin font weights.
- What you can do after
- Evaluate/understand it by identifying which elements attract attention and checking whether text colors meet WCAG guidance and remain readable.
Everyday Data Visualization
Contrast is the visual difference between adjacent colors or elements, commonly expressed through their relative luminance or color properties.
- How it is used
- Uses contrast to distinguish content from backgrounds and direct attention through a visualization’s typographic hierarchy.
- How deep it goes
- Gives WCAG 2.1 minimum ratios and practical color adjustments, but does not explain how contrast ratios are calculated.
- Examples
- Shows blue bars rescued by dark borders and a monochromatic dashboard whose text colors signal importance.
- What you can do after
- Practice/perform contrast checks against WCAG 2.1 thresholds and adjust borders or text brightness to improve legibility and hierarchy.
WordPress Power Toolkit: Harness AI to build next-level websites
Contrast is the difference between visual elements, including color or luminance differences, that makes distinctions and relationships perceptible.
- How it is used
- Improves readability and makes visual distinctions, relationships, and emphasis perceptible across website content.
- How deep it goes
- Defines contrast through practical visual examples and accessibility checks, without developing technical contrast calculations or implementation details.
- Examples
- Uses typeface color against backgrounds, a balanced mountain scene, and a dark potato photograph on a light homepage.
- What you can do after
- Evaluate website readability and composition by checking color differences, visual emphasis, image harmony, and balance.
Read how WordPress Power Toolkit: Harness AI to build next-level websites explains contrast →
Architecting Accessibility
Color contrast is the visual difference between foreground content and its background, typically resulting from differences in luminance or color.
- How it is used
- Makes text and interface elements easier to perceive across differences in vision, lighting, zoom, devices, and orientation.
- How deep it goes
- Defines sufficient contrast as content standing out from its background and illustrates its effects, without giving a calculation in the cited passages.
- Examples
- Uses a low-contrast alert and small, thin gray text to illustrate visibility and readability problems.
- What you can do after
- Evaluate text and interface legibility by checking contrast and adjusting weak typography.
Also covered in
What to know first
- accessibilityDigital accessibility is the extent to which digital content, products, and services can be perceived, understood, navigated, and used by people with diverse abilities and access needs.
- colorColor is a visual property or representation characterized by attributes such as hue, lightness, saturation, or component values.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- digital imageA digital image is a digital representation of visual content, commonly encoded as an arrangement of pixels or other graphical elements.
Related concepts
- ant colony optimizationused by · Ant colony optimization is a population-based probabilistic optimization technique in which artificial agents use simulated pheromone trails to guide the search for good solutions.
- font pairingproduced by · Font pairing is the selection of multiple typefaces that work together to create a clear and coherent typographic system.
- code readabilityproduces · Code readability is the ease with which human readers can understand source code and infer its structure, intent, or behavior.
Questions about contrast
What is contrast?
Contrast is the perceptual or measurable difference in visual properties, such as luminance or color, between elements or regions.
Which Manning books explain contrast?
Design for Developers, CSS in Depth, Second Edition, Everyday Data Visualization, WordPress Power Toolkit: Harness AI to build next-level websites and Architecting Accessibility.
What should I know before learning contrast?
Manning books that teach contrast usually introduce accessibility, color, CSS and digital image first.
What is contrast a kind of?
Contrast is a kind of fundamental. A fundamental is a foundational principle or concept on which broader understanding and practice are built.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




