What Background Color Should a Dropdown Menu Use? Color Schemes for Easier-to-Read Navigation
A dropdown menu reveals additional navigation links when a user opens a top-level item. Its background does not need to be visually loud; the priority is to keep link text readable and make the menu surface distinguishable from the page or header behind it. A light surface, a clear boundary when one is needed, and accent colors reserved for hover and focus usually make the navigation easier to scan.
Use a white menu surface and make only the necessary boundary clearly visible
In the following HEX examples, where HEX is a hexadecimal color code used on the web, use light gray ■#F8FAFC around the page or header area and white ■#FFFFFF for the open dropdown surface. The contrast ratio, meaning the difference in relative luminance between foreground and background, is only about 1.05:1 between these two colors, so the surface-color difference alone is not enough to define the menu boundary.
If the menu needs a visible edge to identify the panel, use a slate-gray ■#64748B border against white ■#FFFFFF, which provides about 4.76:1 contrast. Dark blue-gray ■#334155 link text on white provides about 10.35:1. Separating the roles of surface, boundary, and text keeps the dropdown readable without making the entire panel excessively dark.
WCAG (Web Content Accessibility Guidelines) 2.2 Non-text Contrast requires at least 3:1 contrast against adjacent colors for visual information needed to identify user-interface components and states. This does not mean every decorative border needs 3:1 if the control can already be identified by visible text or an icon. When a boundary is the visual information used to identify the component, check that boundary against the actual adjacent color.
Give the disclosure button, links, and focus state different visual roles
For ordinary website navigation, W3C’s Disclosure Navigation Menu Example shows a top-level button that reveals a list of standard links. W3C specifically notes that typical site navigation does not necessarily need the WAI-ARIA menu role, because that role carries more complex keyboard-interaction expectations. The Disclosure Pattern can be used instead to show and hide navigation links.
Use aria-expanded on the disclosure button, with false when the dropdown is closed and true when it is open. When useful, aria-controls can reference the associated link list. Visually, a blue-gray ■#475569 arrow in the closed state provides about 7.58:1 contrast against white ■#FFFFFF. In the open state, rotate the arrow downward and use royal blue ■#1D4ED8, which provides about 6.70:1.
For a hovered link, a light-blue ■#DBEAFE background with dark-blue ■#1E3A8A text provides about 8.49:1 contrast. The hover background differs from white ■#FFFFFF by only about 1.22:1, so do not make that pale fill the only important state cue. Pointer position, an underline, or a text-weight change can reinforce the interaction.
Check keyboard focus and the conditions that make the dropdown disappear
For keyboard focus, one example is a dark navy ■#0F172A focus ring. It provides about 17.85:1 contrast against white ■#FFFFFF and about 14.63:1 against the light-blue ■#DBEAFE hover background. W3C Focus Visible requires a visible focus indicator for keyboard-operable elements. Keep “the dropdown is open” visually distinct from “this particular link currently has keyboard focus.”
If pointer hover or keyboard focus causes the dropdown to appear, WCAG 2.2 Content on Hover or Focus requires the additional content to be dismissible, hoverable, and persistent under the conditions defined by the criterion. W3C’s Disclosure Navigation Menu Example also demonstrates closing an open dropdown with Escape and closing it when focus moves outside the navigation region.
In HueRoll, you can adjust candidate colors with three- or six-digit HEX values or the color picker, then compare the selected color with white and black. HueRoll does not compare arbitrary custom color pairs or automatically determine WCAG AA or AAA conformance, so verify the actual adjacent combinations used for the menu surface, text, border, hover state, and focus indicator separately.