Skip to main content

Color and Contrast

Text Contrast Ratio

Principle

Ensure sufficient contrast between text and its background for clear readability.

Required Contrast Ratios

Text TypeDefinitionMinimum (AA)Minimum (AAA - optional)
Normal textUp to 16px / 1rem, regular weight4.5 : 17 : 1
Large text24px (18pt) + regular or 18.66px (14pt) + bold3 : 14.5 : 1
Small textBelow 16px> 4.5 : 1 recommended
Disabled textText that is part of an inactive UI componentNo requirementNo requirement
LogotypesText that is part of a logo or brand nameNo requirementNo requirement

Guidance

  • Minimum contrast values are a baseline. Higher contrast is recommended where possible.
  • Increasing contrast is recommended for dense UIs (e.g. tables, forms), small text and mobile use.
  • Contrast must remain valid in light mode, dark mode and across all surface colors.
  • Text on semi-transparent backgrounds must meet the same contrast ratios after blending. Contrast should be checked in the final implementation, not only in design files.

Table showing minimum color contrast ratios for normal, bold, and large text.

WCAG Reference

Non-Text Contrast

Principle

Ensure sufficient contrast for user interface components and graphical objects so they remain clearly perceivable and distinguishable.

Required Contrast Ratios

Element TypeExamplesMinimum Contrast Ratio
UI componentsInput borders, buttons, toggles, sliders, checkbox outlines3 : 1
Graphical objectsIcons, indicators, shapes, outlines3 : 1
Focus ringKeyboard focus indicator3 : 1 (based on WCAG 2.2)
Disabled elementsDisabled buttons, disabled inputsNo requirement

Guidance

  • Contrast must be measured against adjacent colors (not global background).
  • Ensure visibility in both light and dark themes.
  • Thin borders, subtle icons or ghost buttons may need higher contrast for sufficient perceivability.
  • Semi-transparent elements must meet contrast after blending.
  • Design visible focus indicator for all interactive elements.

Overview of minimum color contrast ratios for text, icons, and user interface elements.

WCAG Reference

Do Not Use Color Alone to Convey Information

Principle

Meaning, status or instructions must not rely on color alone; users must always receive at least one additional visual cue.

Examples of Allowed and Not Allowed Usage

SituationColor AloneAccessible Alternative
Validation stateRed = error, green = successAdd icons (✔, ✖), text labels (“Error”, “Success”), or patterns
Required fieldsMarked only by a red borderAdd text (“Required”), an asterisk with explanation, or hint text
Charts & graphsCategories differentiated only by colorAdd textures, labels, markers or patterns
Selected itemsHighlighted only by colorAdd underline, border, icon, or bold text
Status indicatorsGreen dot = onlineAdd label (“Online”), tooltip, or icon change

Guidance

  • Ensure every color-coded meaning also includes at least one of the following:
    • text label
    • icon
    • pattern or shape change
    • border or underline
  • Do not rely on sensory characteristics alone:
    • color, size, shape, position, orientation or sound
  • For charts and complex visuals, ensure differences are perceivable even by users with color vision deficiencies.
  • Avoid using only red and green for opposite meanings — they are the most problematic pair for color-blind users.

Line charts using color only versus color with line styles and labels.

Error states shown with color only versus color with icons and text.

Comparison of status indicators using color only versus color combined with icons and labels.

WCAG Reference