On this page

To check a notification badge, compare the color of its text with the badge color directly behind that text. Enter the two colors into a contrast calculator, then compare the reported ratio with the text contrast requirement that applies to the label’s size and weight.
If the badge or text is transparent, check how the pair appears over the content beneath it. If the result falls short, adjust the label or its background and test again. A separate check of the notification’s wording or symbol can help ensure that its meaning does not depend on color alone.
Identify the colors to compare
Start with the label you want someone to read. It might be a number, a short word, or another text character inside a notification badge. The first color in your comparison is the color of that label. The second is the color immediately behind the label, where the characters appear.
For example, if a badge contains a white number on a red fill, the relevant pair is the white label and the red area behind it. The color of the surrounding page may be useful context, but it is not the background for this text comparison unless it shows through behind the label.
Look across the whole label
Ask whether the background is consistent behind every character. A label can sit over an image, a changing area, or a badge whose appearance changes across its surface. In those cases, one sampled background color may not describe the whole label. Check representative parts of the label, especially areas where the text looks hardest to distinguish from what is behind it.
Also consider whether the badge or label changes when the surrounding content changes. If a transparent badge sits over different content, its apparent color can change as it blends with what is underneath. Note the combinations you need to check rather than assuming one result covers every appearance.
Keep the comparison focused
A badge can have an outline, an icon, and a surrounding interface as well as text. Identify each element before choosing colors so you do not accidentally compare the label with the outline or the page instead of the fill behind the characters. If you also need to assess an icon or another part of the design, treat that as a separate question and consult the applicable guidance for that element.
Write down the label and background colors as a pair, along with the appearance they describe. A note such as “count label over badge fill” makes the result easier to interpret later, especially when you check several variations.
Capture and check the color pair
If you can obtain the original label and fill color values, record both and use them for your initial check. If you cannot, a screenshot can provide colors to examine. Android accessibility guidance suggests using an eyedropper in image software to sample apparent colors from a screenshot for manual contrast testing.
Open a representative screenshot and use the eyedropper to select the label color and the color directly behind it. Record the two values in a format your chosen contrast calculator accepts. Take care to select the badge fill rather than an adjacent outline or the area outside the badge.
Account for transparency and smoothing
A non-opaque color can look different when it blends with the content beneath it. If either the label or the badge fill is transparent, examine the appearance with the actual underlying content in view. If that content can change, repeat the check for the appearances you need to support. A single result for one underlying color should not be treated as a result for every possible background.
Text smoothing and anti-aliasing can also affect the apparent color of text, particularly on thin strokes. When sampling a screenshot, be aware that a point on a character may not appear the same as its original text color. If the original value is available, use it to inform the check; if it is not, inspect the label carefully and note the limits of the sample. Avoid presenting a single sampled point as an exact original value when you cannot verify it.
Read the calculator output
Enter the text color and its immediate background color into a contrast calculator. The output is a contrast ratio: it describes the difference in luminance between the two neighboring colors, with a higher ratio indicating greater contrast. Keep the ratio with your notes about the label, background, and any transparency or changing content.
If a calculator also shows an assessment, check which text criterion it is using before accepting the result. A useful record includes both the reported ratio and the criterion against which you intend to compare it. If you change either color, run the comparison again rather than carrying the old result forward.
Interpret the result for badge text
The ratio is the starting point for a decision, not a complete decision by itself. Compare it with the minimum text contrast requirement that applies to your badge label. Pay attention to the label’s size and weight, and verify whether it qualifies as small or large text under the criterion you are using.
Do not assume that a badge label qualifies as large text simply because it looks prominent on the screen. If you are unsure how the criterion classifies it, check the applicable guidance and the label’s actual properties before choosing a threshold. Section508.gov’s color accessibility guidance is an official starting point for checking the relevant requirements.
Make the result actionable
Use the following questions to turn the calculator output into a useful conclusion:
- What did you compare? Confirm that the two inputs represent the label and the color immediately behind it.
- Which appearance did you check? Note the underlying content if transparency affects the badge or label.
- Which text criterion applies? Verify the label’s size and weight against the guidance you are using.
- Does the ratio meet that criterion? Compare the reported value with the applicable minimum rather than relying only on how the badge looks to you.
- Are there other appearances to check? Repeat the comparison if the background behind the label can change.
If the result meets the applicable minimum for the appearance you checked, record that result with the pair and criterion. If it falls short, use it as a starting point for an adjustment. If you cannot determine the applicable criterion or obtain a representative pair, treat the result as provisional and resolve those questions before declaring the label compliant.
A visual review is still useful: look at the complete label in context and notice where it is difficult to distinguish. Use that observation to choose areas or appearances for further checking, while keeping the measured ratio and applicable criterion central to the assessment.
Improve a badge that is hard to read
When a pair falls short, decide whether you can change the text color, the badge fill, or both. Make a candidate change, enter the resulting pair into the calculator, and compare the new ratio with the same applicable text criterion. Continue until the checked appearance meets that requirement.
For example, if a pale label is difficult to distinguish from its fill, try a different label color and measure the new combination. If the label color needs to stay the same, try changing the fill instead. The useful choice is the one that gives the label enough contrast against its immediate background while keeping the notification understandable in context.
Retest the appearances people may encounter
A change that helps over one background may need another check over different content if transparency is involved. Review each relevant appearance and record the pair and ratio for it. If the badge contains more than one text label or uses different colors in different states, check the applicable pairs separately. Do not assume that a successful result for one label or state covers the others.
Look again at thin characters as well. Smoothing can affect their apparent color, so a label deserves a visual review in addition to the color-pair calculation. If the text still looks difficult to read, consider whether the label’s size, weight, or presentation can be adjusted, then verify any revised design against the applicable criterion.
Keep the meaning clear without color alone
Consider what the badge is trying to communicate. If its color indicates a status or urgency, ask whether a reader can understand that meaning from the label, a clear symbol, or nearby wording as well. For instance, a short status word can provide information that a color by itself does not express. Choose wording or symbols that make sense in the surrounding interface.
Before finishing, review the notification as a whole: can someone identify the label, read it against its background, and understand what it refers to? Save the final color pair and its result alongside the appearance and criterion checked. That gives you a clear point of comparison if the badge or the content beneath it changes later.