Colour Contrast Checker

Test HEX text and background colours with a contrast checker that previews readability and suggests clear fixes.

Clarity & Vision

Design accessible interfaces that everyone can enjoy.

Contrast Ratio 7.90:1 Excellent
100%
100%
51%
100%

What Colour Contrast Checker Does

Colour Contrast Checker compares a text colour against a background colour and turns the pair into a readable contrast ratio. The result matters when body copy, buttons, form labels, badges, navigation links or chart labels need to remain clear on light, dark or saturated backgrounds. A pair that looks attractive in a design file can still fail for small text, especially when the foreground colour is thin, semi-transparent or placed on a vivid brand colour.

The checker shows the live sample, the current ratio, pass or fail status and readability checks for normal and large text. It also gives practical feedback through the Smart Advisor area, so a weak pair can be corrected without guessing whether the text colour or the background colour needs the stronger adjustment. The controls are intentionally direct: pick or type HEX values, change lightness, adjust opacity, swap the pair or reset the controls.

A good contrast checker is useful before finalising website themes, landing pages, dashboards, social graphics, component libraries and design system tokens. The safest habit is to test the exact foreground and background pair that users will see, not only the nearest brand colour in a palette. A blue button, a pale label, a grey disabled state and a white card can each need a separate contrast check.

How to Use Colour Contrast Checker

  1. Choose the Text Colour with the colour picker or type a HEX value in the text colour field.
  2. Choose the Background Colour with the colour picker or type a HEX value in the background colour field.
  3. Read the live preview, the contrast ratio and the readability checks for normal or large text.
  4. Move the Lightness sliders when the pair is close but needs a clearer separation between foreground and background.
  5. Use the Opacity sliders carefully when the real design uses transparency, then check the flattened result again.
  6. Select Swap Colours when the same pair needs to be tested in the opposite direction.
  7. Use Reset to return to the starting pair, or copy the foreground or background HEX value when the checked colour is ready to reuse.
  8. Open Contrast Checker Pro when a palette, image sample or code snippet needs a wider matrix-style review.

What the Contrast Ratio Tells You

The contrast ratio is a numeric comparison between the relative luminance of the two colours. A higher number means stronger separation. Ordinary interface text usually needs more contrast than large headings because small letterforms are harder to read. Stronger readability targets are useful for long reading areas, critical instructions and interfaces that need a more conservative accessibility margin.

Do not read the ratio as a beauty score. A pair can pass and still feel too harsh for a calm brand, or fail even though it looks balanced on a bright monitor. The ratio answers a narrow accessibility question: whether the text and background have enough luminance contrast for readability. Typography, spacing, font weight and context still matter after the colour pair passes.

Visible resultMeaningPractical response
AAA or ExcellentThe pair has strong separation for normal and large text.Use it for body copy, controls and important interface text.
AA Normal or GoodThe pair meets a common readability target for normal text.Suitable for most UI text, but still check small fonts and low font weights.
AA Large or PartialThe pair may only work for larger or heavier text.Avoid small labels, helper text and dense paragraphs with this pair.
Poor or FailThe foreground and background are too close in luminance.Darken one colour, lighten the other, or choose a safer alternative.

Choosing Between AA and AAA Targets

AA is a practical minimum for most interface text, but AAA is a better target when the text carries important instructions, long-form reading, legal information, price details, error messages or other content that users should not struggle to read. A design can use AA for secondary controls and AAA for critical copy, as long as the rules are documented and applied consistently.

Large text thresholds are useful for headings, hero statements and prominent labels, but they should not be used as a shortcut for small UI text. A card title may qualify as large text while the supporting description, badge or call-to-action label does not. Check each real text size and role before deciding that one ratio covers the whole component.

Handling Opacity and Real Backgrounds

Opacity can make a previously safe colour pair fail because the final colour is blended with whatever sits behind it. Semi-transparent white text over a coloured background may look softer, but the effective foreground is no longer pure white. The same issue appears with translucent panels, disabled labels and overlays placed above images.

When a design uses transparency, test the colour after the transparency is applied. If the exact rendered colour is not available, use the opacity controls to approximate the visual result and then check again in the finished layout. The safest production choice is a solid text colour on a stable background for body copy and important controls.

When to Test a Colour Pair

Test contrast whenever a colour is used for information, navigation or interaction. Primary buttons, secondary buttons, error messages, success states, tabs, chips, badges, chart labels and form validation text all depend on the text remaining legible. Decorative shapes and purely visual accents can be treated differently, but anything a user must read should be checked.

Background complexity can change the decision. A colour that works on a plain white surface may fail on an image overlay, a tinted card, a gradient or a semi-transparent panel. For overlays, test the colour that appears after transparency has been applied, because the final visual colour is what affects readability. Opacity controls help approximate that situation when the design uses translucent foregrounds or backgrounds.

Common Contrast Mistakes

  • Checking a brand colour in isolation instead of testing the exact foreground and background pair.
  • Assuming large headings pass because they look bold, while small labels or helper text fail.
  • Reducing text opacity after a pair passes, which can lower the effective contrast.
  • Using grey-on-white or grey-on-black for secondary text without checking the actual ratio.
  • Relying on colour alone for states such as success, warning, danger or disabled controls.
  • Forgetting to test dark mode and light mode separately, especially when the same accent colour is reused.

Keep a small record of the checked pair when it becomes part of a design system. The record should include the foreground HEX value, the background HEX value, the ratio, the intended text size and whether the pair is approved for normal text, large text or decoration only. That note prevents the same colour from being reused later in a context where it no longer passes.

How to Improve a Failing Pair

The quickest improvement is usually to increase the luminance distance. Dark text needs a lighter background, while light text needs a darker background. When the pair is close to passing, a small lightness adjustment can be enough. When the ratio is far below the target, choose a more distinct shade rather than making several tiny changes that still leave the text hard to read.

Preserve the design intent where possible. A purple button can stay purple while the text moves from pale grey to white, or the background moves from mid purple to a deeper shade. If a brand palette is strict, check alternative text sizes, font weights or component states before rejecting the colour completely. For choosing a new shade from scratch, Colour Picker can help refine the HEX value before returning to the contrast check.

Recheck the pair after any brand refresh, typography change or theme update, because even small visual changes can affect whether the same colour combination remains comfortable to read.

Best Practices for Accessible Colour Decisions

  • Keep one tested pair for normal text, another for muted text and another for interactive controls instead of reusing one colour everywhere.
  • Document the checked HEX values beside the ratio, because visually similar colours can produce different results.
  • Use stronger contrast for small text, dense tables, mobile interfaces and low-light environments.
  • Retest after changing opacity, background overlays, gradients or theme mode.
  • Add icons, labels or patterns when colour communicates status, so the message is not dependent on colour alone.
Copied