Saltar al contenido

Lección 6 · Principles of Design

Contrast: Making Differences Count

Use contrast in size, weight, value, shape and space to create focus and readable text, and learn the basic web contrast ratios that help more people read.

Contrast is a visible difference between things: big and small, dark and light, round and square, crowded and open. Contrast creates focus. It also makes text readable.

A good working rule: if two things are meant to look different, make the difference easy to see. A tiny difference often looks like an accident.

What you will learn

  • The main kinds of contrast
  • How to make contrast look intentional
  • Common web contrast minimums for text
  • How to fix weak contrast without making a design noisy

Kinds of contrast

Kind Example pair
Size Huge headline, small caption
Weight Heavy title, regular body text
Value Near black text, near white paper
Hue One warm accent among cool colors
Shape A circle among rectangles
Texture A rough photo beside a flat color block
Space A dense list beside an open area
Direction One vertical label in a horizontal layout

You do not need all of them. Two or three used clearly are usually stronger than all of them at once.

Make it clear or make it match

Suppose your heading is 18 pixels and your body text is 16 pixels, both in the same weight. A reader may wonder whether the heading is a mistake. You have two honest choices:

  • Match them, if they have the same role.
  • Separate them, if they have different roles. Make the heading much larger, or bold, or add space above it.

Combining two kinds of contrast, such as size and weight, makes the difference very clear.

Value contrast and readability

For text, the difference in lightness between the letters and the background matters a lot. The Web Content Accessibility Guidelines (WCAG) describe this with a contrast ratio from 1:1 (no difference) to 21:1 (black on white). At level AA, they ask for at least:

  • 4.5:1 for normal-size text
  • 3:1 for large text, which is at least 18 point, or at least 14 point bold

There are exceptions, for example for logos and purely decorative text. These numbers are written for digital content. They are still a helpful check when you think about print, but paper, ink and lighting also matter there. Laws that refer to accessibility standards differ by country.

A passing number does not guarantee comfort. Very thin letters, tiny sizes and busy backgrounds can still be hard to read.

Text on photos

A photo often has light and dark areas, so one text color cannot contrast with all of them. Try these fixes:

  1. Place the text on a calm, even part of the image.
  2. Add a solid or partly see-through panel behind the text.
  3. Darken or lighten that area of the photo with a soft gradient.
  4. Move the text off the photo into its own area.

Check the weakest spot behind the letters, not the average.

Worked example: a concert ticket

Weak: the band name, seat number and terms are all medium gray on light gray, at nearly the same size.

Better:

  • The band name becomes large and near black.
  • The seat number sits in a dark box with white text, because people look for it at the door.
  • The terms stay small but dark enough to read.

The ticket now has two clear focus points. The terms are quiet because of their size and position, not because they are pale.

To quiet a less important item, first reduce its size or weight. Fading it to pale gray can make it unreadable for many people.

Too much contrast

Contrast needs a calm background to work against. If every item uses a new size, color and shape, your eye has no resting place. Choose where the difference should be, and keep the rest consistent.

Some readers find pure black on pure white glaring on screens. A very dark gray or a slightly off-white can feel softer. Keep checking the ratio when you soften colors.

Practice: one contrast at a time

Take a plain list with a title and four items, all in the same style. Make four copies.

  1. In the first, change only the title size.
  2. In the second, change only the title weight.
  3. In the third, change only the space below the title.
  4. In the fourth, combine the two changes you liked best.

Look at all four from the same distance. This exercise shows how strong each tool is on its own. It also shows that two clear differences often work better than several weak ones. Keep your results in your design journal.

Check states on screens

Buttons and links change when people point at them, move to them with a keyboard or find them switched off. Check the text contrast in each active state, and make sure the keyboard focus indicator is easy to see. A design that passes only in its resting state is not finished.

Common mistakes

  • Using differences so small that they look like errors.
  • Putting light gray text on white because it looks elegant.
  • Placing text over a busy photo and checking only one spot.

Try it

Decide whether each color pair meets the 4.5:1 level for normal text. The tool calculates the ratio after you answer.

Pass or fail contrast game

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A heading is only slightly bigger than the body text. What is the best fix?

    Differences meant to show roles should be easy to see.
  2. 2. Under WCAG level AA, what is the minimum ratio for normal-size text?

    Normal text needs 4.5:1. Large text needs 3:1. There are some exceptions.
  3. 3. Text over a photo is readable in one place and not in another. What helps?

    An even background keeps the contrast steady behind every letter.
  4. 4. What happens if every item has strong, different contrast?

    Contrast works best against a consistent background.

Summary

  • Contrast is a visible difference that creates focus.
  • Make differences clear, or make items match.
  • WCAG level AA asks for 4.5:1 for normal text and 3:1 for large text.
  • Control the area behind text that sits on photos.
  • Keep most things consistent so the contrast can work.

Next: Alignment and Proximity

Sigue tu progreso

Crea una cuenta gratis para marcar lecciones y retomar donde lo dejaste en cualquier dispositivo.