How to fix color contrast accessibility on marketing pages

Sage and gray color swatches showing readable and faint text against white and dark backgrounds

Your marketing page can coordinate beautifully with a product photograph and still make the shipping cost hard to read. Pale captions cause trouble. So do subtle form borders and white lettering over a curtain pattern.

Good color contrast accessibility starts with those reading tasks, rather than a debate about which palette looks best. Someone checking your offer while stirring dinner doesn't need your colors to impress them. They need to see what the offer means.

You can preserve your visual identity. The useful shift is to approve color pairings for specific jobs, then test those jobs on the finished page.

Two color jobs for color contrast accessibility

Your campaign brief can mix product and interface colors without assigning either a clear role in the purchasing journey. A lipstick shade might inspire the button fill, while the pale wall in a room photograph becomes the background for delivery information. A coordinated look doesn't establish readable contrast.

For physical-item preparation, The Match That App is an iPhone color matching app by Match That LLC. It compares the colors of 2 to 5 items, including clothing, makeup, and home items. Its photograph-and-confirm workflow involves photographing an item, confirming the detected color, photographing another item, and pressing Match That to see a matching percentage from 0% to 99%. It compares each item's color, not the item itself. That percentage isn't a WCAG contrast ratio.

You can separate your brief into merchandise colors, which help coordinate the products or scene, and information colors, which carry prices, labels, and actions. The site's color guides can support palette planning; website contrast needs its own numerical check.

Say a Portland curtain shop sells an $89 panel and receives 240 paid visits a day. Those are hypothetical planning details, not campaign results. Its soft sage photography can remain unchanged while delivery text gets a darker foreground. You aren't asking one palette to perform every job, which reduces pressure to compromise reading for coordination.

Which WCAG ratio applies to each page element?

A familiar mistake is treating every button as a 3:1 case, including its small label. Another is calling a heading large because it looks prominent. Both shortcuts can give your page a false pass.

W3C's WCAG 2.0 (2008) established the text thresholds retained in WCAG 2.2 (2024). At Level AA, the intermediate conformance level, you can classify your checks this way:

  • Normal text: at least 4.5:1 against its background. This includes ordinary button labels, prices, placeholder text, and meaningful small print.
  • Large text: at least 3:1. W3C defines this as at least 18 point, or 14 point bold, with equivalent sizing provisions for Chinese, Japanese, and Korean fonts.
  • Required non-text information: at least 3:1 against adjacent colors under Success Criterion 1.4.11. This covers necessary control and state cues. It also covers graphical parts needed to understand content.

W3C added the non-text criterion in WCAG 2.1 (2018); WCAG 2.0 alone doesn't include it. A button may therefore need one check for its label and another for a necessary visual cue. You don't automatically have to test every decorative border.

Logo text, purely decorative text, and inactive controls have specified exceptions. Your delivery terms aren't decorative because a designer wants them to look quiet. A good default is 4.5:1 for meaningful copy unless you've confirmed that it qualifies as large text. That keeps your interpretation tied to the requirement, rather than visual preference.

How do you calculate a contrast ratio?

A hex value, the six-digit color code such as #777777, doesn't tell you its contrast by itself. Nor can you subtract two RGB values and call the difference a ratio. The calculation needs to account for how sRGB channels encode brightness.

W3C's WCAG 2.2 (2024) defines relative luminance, written L, as brightness normalized from 0 for black to 1 for white. For ordinary sRGB colors, you can follow this calculation:

  1. Divide each red, green, and blue channel value by 255 to get a normalized channel c.
  2. Convert each channel to a linear value. If c is at most 0.04045, the value is c / 12.92. Otherwise, it's ((c + 0.055) / 1.055)^2.4. The ^ symbol means raised to a power.
  3. Calculate L = 0.2126R + 0.7152G + 0.0722B, using those linear channel values.
  4. Calculate contrast = (Llighter + 0.05) / (Ldarker + 0.05).

Our worked example uses #777777 text against a solid #FFFFFF background, a familiar pairing for subdued captions on product pages. Each gray channel is 119, so c = 119 / 255 = 0.466666666666… . The nonlinear branch gives ((119 / 255 + 0.055) / 1.055)^2.4 = 0.1844749945004409, displayed to 16 decimal places. All channels are equal, and 0.2126 + 0.7152 + 0.0722 = 1, so Lgray is the same value. White has Lwhite = 1.

Keeping the unrounded luminance in the calculation, the ratio is (1 + 0.05) / (Lgray + 0.05) = 4.4780894535772156:1, displayed to 16 decimal places. Both high-precision and standard floating-point calculations place it below 4.5:1. You'd report approximately 4.478:1, but compare the unrounded result with the threshold.

This fails normal-text AA. It passes the large-text minimum. Rounding to one decimal would display 4.5:1 and hide the failure, which is why your color contrast accessibility decision should use the full calculation, not a shortened display.

A pairing fix can preserve your campaign palette

Darkening every brand color can solve one pair and damage another. A foreground that works on white might become hard to read on a dark promotional banner. A tiny passing margin also leaves little room for a later background change.

You can start with the failed pair, not the whole palette. In the worked example, changing #777777 to #767676 against white produces approximately 4.542224959605254:1. That's a normal-text pass, but it's a narrow one. A darker information color gives you more separation if the design permits it; you'd still calculate its actual pairing.

For the hypothetical curtain shop, a solid text panel beside the photograph avoids dependence on which fold happens to sit behind the price. If text must overlap the image, an opaque panel provides a predictable background. A translucent overlay needs a check of the resulting colors beneath each text area, including different responsive crops.

There's a visual trade-off. A solid panel can hide part of the photograph, while darker captions can feel less delicate. But the price and delivery terms serve a reading task. You can reserve softness for decoration and keep that information readable without changing the curtain's photographed color.

Page states your first screenshot misses

Your initial screenshot doesn't show a failed form submission or a keyboard focus ring. It also won't reveal a mobile crop that moves white lettering over a white comforter. A default-state pass leaves these cases unanswered.

A practical test record can identify the element, foreground, background, text size, state, calculated ratio, and required threshold. You can think of each record as a pairing contract: approval applies to those conditions. It doesn't follow the foreground color onto every future background.

Your browser's developer tools can expose computed styles and often provide contrast checks. An automated scan can flag detectable problems, but your manual review needs to open the states the scan didn't reach. For solid-color text, computed values avoid softened letter-edge samples. Transparency needs the composited colors.

  • You can inspect hover, focus, selected, and error states because a style change may introduce a different adjacent color.
  • You can inspect your smallest supported layout and any other changed crops. The text may sit over a different photographic detail.
  • You can test each supported theme because a token inherited from light mode may meet a different surface in dark mode.
  • You can tab through the page because a custom focus indicator needs contrast where it actually appears.

You aren't comparing a hover color with yesterday's default color. Under the non-text criterion, the relevant comparison is with adjacent colors in that state. This distinction prevents wasted fixes to pairs visitors never see together.

Passing ratios can still hide color-only meaning

A red error border can have ample contrast and still leave a visitor wondering what went wrong. Green and red swatches can also communicate available and unavailable products without telling someone who can't distinguish them which is which.

W3C's Understanding Use of Color (2025) states:

Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.

You can keep the red border and add visible text such as Please enter your email address. The label explains your requested response. Similarly, a sold-out swatch can carry an Unavailable label instead of relying on a color change.

For ordinary inline links, a persistent underline gives readers a cue beyond color. The link text still needs its own contrast against the background. On a campaign chart, direct labels or patterns can supplement colored areas so readers don't have to match hues to a distant legend.

Passing color contrast accessibility checks doesn't certify your entire page. Your broader assessment still needs to cover keyboard operation and accessible names, along with the other requirements for your chosen WCAG conformance level. Visible cues address one problem; they don't replace programmatic information for assistive technology.

Your next release starts with readable delivery copy

A release checklist can drift toward the most visible element, usually the hero or main button. Meanwhile, a pale shipping charge or unclear error message can remain on the purchasing path. Those details deserve attention before decorative polish.

You can begin your next review with the price, delivery terms, and form feedback. The reason is practical: each carries information needed to understand or complete the offer. After checking them, you can verify action labels and necessary control cues, then audit the remaining meaningful content. Priority sets the order, not an exemption.

Before publication, your pairing contract can include an owner and the exact page state tested. When your creative revision replaces a background photograph or changes its crop, you'll know which specific approval needs repeating before the next release. A click-through experiment can compare already compliant designs, but it shouldn't decide whether unreadable text ships.

For the curtain page, the release decision can be specific: the $89 price and delivery terms pass against their actual backgrounds on the mobile layout, and the email error has readable visible text. That's a testable sign-off, not approval of sage as an accessible color.