Contents

Testing foreground and background color contrast helps confirm that text, icons, and interactive controls remain visible and understandable for people with low vision or color-vision differences. PaletteBench provides browser-based tools—a color picker, a four-color palette generator, and a contrast checker—so readers can inspect pairings without uploading design files or images. All observed tool behavior should be treated as current behavior rather than a permanent guarantee, and readers should verify specific thresholds against current WCAG guidance before finalizing decisions.
The contrast checker accepts foreground and background HEX values and reports whether a pairing meets WCAG AA and AAA levels for normal and large text. The color picker keeps HEX, RGB, and HSL entries synchronized and shows a live preview. The palette generator creates four-color harmonies from a starting color and allows individual swatches to be locked while schemes change. This guide walks through what to test, how to pair the tools, and how to interpret results responsibly.
Text contrast testing with the contrast checker
Which text elements to test
Body text, headings, captions, labels, links, button labels, error messages, placeholder text, and any other visible text that conveys information should be checked against its background. Text that is purely decorative and not part of an interface component may be outside contrast requirements, but when text communicates content or function, both the text color and the immediate background color should be evaluated.
Inputs accepted by the contrast checker
The checker uses foreground text color HEX and background color HEX as its two inputs. Readers can obtain HEX values from the color picker, which accepts HEX, RGB, or HSL entries and keeps all three formats synchronized while showing a live color preview. Because design files cannot be uploaded to PaletteBench, readers should manually read colors from their markup or user agent representation and enter them into the tools.
Outputs and decisions
The checker reports whether the entered pairing passes WCAG AA and AAA thresholds for normal text and large text. A passing result means the pairing meets the selected threshold; a failing result means the foreground or background should be adjusted before publication. If the ratio sits close to a threshold, readers should treat it as needing review rather than assuming compliance, because computed ratios are compared without rounding—for example, 2.999:1 does not meet a 3:1 requirement.
Large text considerations
WCAG distinguishes normal text from large text, and the applicable AA and AAA targets differ accordingly. Readers should confirm which size category applies to each text element before interpreting the checker’s AA and AAA outputs. If a design mockup contains a failing pairing, record the exact HEX, RGB, or HSL values from the markup and enter them into the color picker to reproduce and test the pairing in the checker.
Practical tip
Test the actual rendered pairing rather than an approximate swatch when possible. Thin text can appear fainter than its coded color due to anti-aliasing, so authors may want to exceed the minimum threshold instead of aiming exactly at it.
Icon and graphical element contrast testing
Identify meaningful icons and graphics
Icons and graphical objects that are needed to understand content or operate an interface should be tested when they convey information. Decorative images that do not add meaning may not require the same contrast evaluation, but meaningful symbols, instructional illustrations, and state-indicating graphics do.
Choose the adjacent background
Measure the icon or graphic against the color immediately next to it. If an icon appears inside a colored button, the adjacent background is the button’s background, not the page background behind the button. If an icon sits directly on the page, use the page background. For an input with a white internal background and a dark border, “adjacent colors” refers to the colors next to the component, including the external background around the input.
3:1 non-text threshold and exemptions
Visual information needed to identify user interface component states—such as selected or focused states—must maintain at least 3:1 contrast with adjacent colors. This includes indicators such as checkboxes and arrows showing that a menu is open. User interface components and meaningful graphics generally fall under this 3:1 non-text threshold rather than the stricter text thresholds. Inactive components may be exempt from contrast requirements in some situations, but readers should verify the current WCAG scope before assuming any element is excluded.
Anti-aliasing caution
Thin lines and shapes may render fainter on screen than their CSS values because of anti-aliasing. Evaluate colors from the user agent or markup and consider exceeding the minimum threshold where practical.
Interactive control and focus-indicator contrast testing
Controls to test
Buttons, text inputs, checkboxes, radio buttons, sliders, and similar interactive components should each be checked. Text labels on controls should meet the applicable text contrast threshold, while the graphical parts of controls—such as borders, check marks, radio indicators, and slider thumbs—should be evaluated against the adjacent background at the non-text threshold.
Test every relevant state
Interactive elements should be checked in default, hover, focus, and active or pressed states. Disabled states may have different requirements, but readers should confirm current WCAG exemptions before skipping any state. Each state can introduce different foreground and background combinations, so a control that passes in its default state may fail in hover or focus.
Use the picker and checker together
Open the color picker to sample or enter the foreground and background HEX values for a given state, keep the formats synchronized, and then enter the pairing into the contrast checker. Repeat for each state and for each element part that conveys meaning. Because PaletteBench runs in the browser with no uploads, readers can test many pairings quickly without sending design files to a server.
Focus indicators
Even when a control does not require a visual boundary around its hit area, it still needs a sufficiently contrasting focus indication. Focus outlines, rings, or borders should be tested against their adjacent background so keyboard users can identify the active component.
Color-only state changes and supplementary cues
When color alone is not enough
If a state change is communicated only by a change in color—for example, a link that turns from blue to red when focused—the color change should meet a 3:1 contrast ratio or be supplemented with an additional visual cue. Suitable supplementary cues include an underline, border, icon, or shape change. The cue itself should also be evaluated for sufficient contrast against its background.
Verifying the supplementary cue with PaletteBench
Use the color picker to obtain the HEX, RGB, or HSL values for the cue color and its adjacent background, then enter the pairing into the contrast checker. Check whether the cue passes the relevant threshold. If the color change itself is being used as the indicator, verify that the two state colors differ by at least 3:1 against their shared background or adjacent context.
Borderline results
Because ratios are compared without rounding, a value such as 2.999:1 does not satisfy a 3:1 requirement. Readers should treat borderline readings as failures or as signals to choose a stronger color difference rather than relying on visual estimation.
Workflow from palette generation to contrast verification
Start with a color in the picker
Use the color picker to choose a starting shade visually or by entering HEX, RGB, or HSL values. The live preview and synchronized formats make it easy to move between representations.
Generate harmonies
Send the starting color to the palette generator, which builds four-color harmonies using complementary, analogous, triadic, or tetradic schemes. Explore the resulting swatches for text, backgrounds, icons, and control elements.
Lock useful swatches
Individual swatches can be locked so they remain unchanged when the scheme is switched or the palette is randomized. Locking preserves a brand color, background, or text color while the reader tests alternative harmonies for the remaining swatches.
Test pairings in the contrast checker
Take foreground and background HEX values from the generated palette and enter them into the contrast checker. Evaluate normal text, large text, icons, and control parts against AA and AAA outputs as appropriate. If a pairing fails, return to the generator, unlock or adjust swatches, generate a new harmony, and retest.
Reading-context decisions
Final decisions should reflect the actual reading context: body text may need different treatment than headings, and icons inside buttons may need different treatment than icons on page backgrounds. Keep records of the HEX values tested and the checker outputs so the choices can be reviewed later.

