Navy blue website accessibility: colors for real interfaces
Navy blue can work on an accessible website, but it isn't accessible by itself. What matters is the exact foreground and background colors, their roles and their interaction states. White text over navy may pass easily. Yet a gray caption, unmarked link or vanishing focus ring can fail in the same interface.
Can navy blue be accessible on a website?
Yes, navy blue can be accessible when each color pair meets the requirements for its role. Navy blue website accessibility depends on the colors shown, text size and interaction state—not the color name. A palette alone cannot show whether focus gets clipped or people can recognize a link.
Before you start, gather your exact color values and identify their jobs. These include text, surfaces, links, control boundaries and focus indicators. You'll need a contrast checker and a working page or prototype for keyboard and state testing.
For WCAG AA:
- Normal text requires a contrast ratio of 4.5:1 or higher against its background.
- Large text needs at least 3:1. Large means at least 18 points, or 14 points when bold. These sizes are about 24 CSS pixels and 18.67 CSS pixels, respectively.
- Applicable essential non-text information must have 3:1 contrast or higher against adjacent colors. Examples include a necessary input boundary or an icon that identifies an action.
A button label that looks bold does not automatically count as large text. Decorative details need not meet the contrast rules for information people need to understand or use the page.
For enhanced AAA text contrast, the thresholds are 7:1 for normal text and 4.5:1 for large text. These are not the AA baseline.
For a 2026 release, confirm which requirements apply using current official W3C guidance. Include WCAG 2.2 and its Understanding documents for SC 1.4.3 and SC 1.4.11.
Choose pairs by what they need to do
Choose each color pair for a specific job in the interface. A pair that works for a large heading may fail for a small caption. The table below gives calculated WCAG contrast ratios for opaque sRGB colors. These calculations do not measure a finished page, and other navy shades need their own checks.
- Assign each candidate color pair a specific interface role.
Values are shown to two decimal places. Use the unrounded result to decide whether a pair passes.
| Foreground | Background | Contrast | Permitted role | Failure mode |
|---|---|---|---|---|
#FFFFFF | #000080 | 16.01:1 | Normal text; meaningful icons | Opacity or a changed surface invalidates this result |
#000080 | #FFFFFF | 16.01:1 | Body text; links; necessary borders | Links still need an identifying cue |
#333333 | #FFFFFF | 12.63:1 | Normal body text | Nearby navy links can blend in |
#000000 | #000080 | 1.31:1 | Decorative use where contrast is irrelevant | Fails text and essential non-text thresholds |
#808080 | #000080 | 4.05:1 | Large text; applicable essential non-text information | Fails normal-text AA |
The gray-on-navy row shows a useful trap to catch early. It can work for a heading that's large enough, but not an ordinary footer caption. Don't round a near miss up to a pass.
For any other shade called navy, enter its exact value and intended background into the checker. The results above do not apply to every dark blue.
Make navy links recognizable within dark text
Give inline navy links an underline that stays visible before anyone interacts with them. Navy body text such as #000080 has ample contrast on white. But a navy link beside black or #333333 text can look like another word. Contrast against white does not prove that readers can identify the link.
- Give inline navy links a persistent underline.
For example, imagine the sentence “Questions? Contact support.” Set it in dark gray and underline the navy words “Contact support.” The underline marks the link without making someone distinguish two dark colors.
A hover-only underline arrives too late for someone who has not recognized the link. Touch users may never see it. A thicker underline on hover can add feedback without replacing the persistent cue.
W3C's Understanding SC 1.4.1 explains the broader rule against relying on color alone. Check visited links too: their changed color must stay readable against the background, and the underline should remain.
Check controls and focus, not just button labels
Check both the label and the visual details people need to recognize each control. Test the relevant states, not just the default view. A navy button with white text passes the label contrast check, but the button may disappear into a navy section. A white border can identify it where an outline is needed.
- Audit each control across its relevant states.
For inputs, check the necessary boundary against its surroundings, along with the text inside. A navy border on white works; a faint gray border needs its own calculation. Keep a visible label instead of relying on a placeholder.
Check meaningful icons against adjacent colors too. A decorative icon beside a complete text label may not carry essential information.
Review these states separately:
- Default and hover: Keep labels readable and controls recognizable.
- Keyboard focus: Make the indicator visible against adjoining surfaces. A navy ring that shows on white can vanish in a navy header.
- Active and selected: Preserve contrast. Show selection with text, shape or another non-color cue.
- Error: Include a clear message that identifies the problem and is associated with the field. A red border alone is not enough.
- Disabled: Inactive controls have contrast exemptions, but unreadable labels still make an interface harder to understand.
A two-color focus indicator is useful across light and navy surfaces. You still need to inspect how it works. Contrast alone does not prove that it meets focus visibility or obstruction requirements.
Retest navy when the background changes
Retest navy whenever a theme, opacity setting or image changes its background. A pair that passes in light mode does not automatically pass in dark mode. Transparency blends colors, while photos create varied backgrounds. Check the colors as they appear, rather than relying on the original palette or one image sample.
Reassign semantic color tokens for each theme. These are names based on jobs, such as text or surface. Keeping navy text while changing white surfaces to dark gray is not a usable theme conversion. Repeat the control-state checks in both themes, including focus and errors.
For example, white footer text at reduced opacity over navy appears as a blended color, not #FFFFFF. Check that rendered foreground against the rendered background. The original token's contrast result no longer applies. The same issue arises when a partly transparent navy panel sits over another surface.
A hero heading can pass over one part of a photo and fail after a mobile crop. Prefer an opaque text panel when practical. If you use an overlay, test text contrast across the image areas and crops that can appear. Don't sample just one convenient spot.
Put the palette into one small interface
Build a contact card to connect each palette choice to a visible job. Use role-based tokens for the header, body, field and action. The CSS below supplies the base palette and focus treatment, not a complete form. Hover, active and error behavior still need to be built with correct markup and behavior.
- Build a contact card using role-based tokens.
- Header — “Contact us”: White text on a navy surface.
- Body — “Send us your question”: Dark gray instructions on white, followed by an underlined navy “Contact support” link.
- Field — “Your message”: A visible label above an input with dark gray text, a white fill and a navy boundary.
- Action — “Send message”: A navy button with a white label, plus a visible keyboard-focus treatment.
These CSS tokens carry the verified pairs into that example:
:root {
--surface: #FFFFFF;
--brand-surface: #000080;
--text: #333333;
--on-brand: #FFFFFF;
--link: #000080;
--border: #000080;
--focus-light: #FFFFFF;
--focus-dark: #000080;
}
.contact-card {
color: var(--text);
background: var(--surface);
}
.contact-card__header,
.contact-card button {
color: var(--on-brand);
background: var(--brand-surface);
}
.contact-card a {
color: var(--link);
text-decoration: underline;
}
.contact-card input {
color: var(--text);
background: var(--surface);
border: 2px solid var(--border);
}
.contact-card :focus-visible {
box-shadow: 0 0 0 2px var(--focus-light);
outline: 2px solid var(--focus-dark);
outline-offset: 2px;
}The header and button use white on navy at 16.01:1. Input text uses dark gray on white, with a ratio of 12.63:1. The navy input boundary also has 16.01:1 contrast against white.
The focus treatment combines a white inner band with a navy outer outline. This lets one band remain visible on either surface. Check that containers do not clip it.
For hover, thicken the link underline and underline the button label without changing their colors. For an active button, a double underline can add feedback. For an input error, add a visible “Error:” message associated with the field. Do not merely recolor its border.
If you reuse these tokens inside a navy section, reassess the link and control boundaries. Don't assume the white-card rules still work.
Know what a passing palette cannot prove
Passing color checks cannot prove whole-site accessibility. A high-contrast button may lack an accessible name. A clearly visible menu may still be impossible to open with a keyboard. Treat this palette as design guidance with limits, not a verdict that the site meets accessibility requirements. Color is only part of the review.
You also need meaningful structure, sensible focus order and clear error handling. Test zoom and reflow so people can enlarge content without losing information or controls.
Color-vision simulation can reveal confusing distinctions. It does not replace contrast calculations or interaction testing. Automated tools can flag some problems, but they cannot determine whether every interaction makes sense.
Run this check before you publish
Verify the built page before release, not just the palette. Check exact color pairs, rendered backgrounds, themes and interaction states. Test keyboard use, links, errors, zoom and reflow. Record what you tested and fix failures before publishing. Passing this review is not a verdict on the accessibility of the whole site.
- Verify the implemented page before releasing it.
- Check exact foreground/background pairs with a tool such as WebAIM Contrast Checker or browser developer tools. Include muted captions and placeholders that convey instructions. Record the role, pair, ratio and permitted text size.
- Inspect actual rendered backgrounds, opacity and image crops. Repeat for each theme and relevant interaction state.
- Use Tab and Shift+Tab to move through the page. Then activate controls with their expected keyboard commands. Confirm that focus stays visible and is not hidden by sticky content or clipped containers.
- Review inline links, selected states and errors manually. People should understand them without having to distinguish colors.
- Run an automated accessibility check, such as an axe-core-based tool. Investigate its findings instead of treating its score as proof.
- Check zoom and reflow for lost content or controls.
- Confirm the criteria that apply using official W3C guidance that's up to date. Keep the exact pairs and tested states in your release notes.
The color and interaction checks are complete when required text and essential visual information meet their applicable contrast thresholds. Links must remain identifiable. Controls must work with visible keyboard focus across the tested states and themes.
If a required pair fails or focus disappears, fix that role or state. Repeat the check before publishing.
