Yellow and Blue Color Combinations (Dark): Hex Codes and Contrast
How yellow and blue work together in a deep, dark version: hex codes, contrast, which should lead, the neutrals and accent to add, and what the pair says.
Yellow and blue in their deep, dark versions are a combination people ask about often. Yellow (Secret Passage (#3A2C02)) brings sunshine, joy and optimism; blue (Marine (#142B5A)) brings sky, sea and trust. Put together, the pair reads as serious and rich. This guide shows how to use them, how readable they are together and which neutrals and accents to add.
How they look together
Measured against each other the two colors reach 1.01:1 (Fail). That is low, so treat them as companions in decoration rather than as text on background.
| Combination | Contrast | Level |
|---|---|---|
| Yellow on blue | 1.01:1 | Fail |
| Yellow on a light neutral | 12.07:1 | AAA |
| Blue on a light neutral | 12.21:1 | AAA |
| Yellow on a dark neutral | 1.36:1 | Fail |
| Blue on a dark neutral | 1.34:1 | Fail |
Which one should lead?
Give most of the space to one and use the other as the accent. Here blue is the more saturated of the two, so it draws the eye first. Use it sparingly, as the accent, and let yellow lead, and keep the other for details, buttons and highlights. A split near 70 to 30 usually feels balanced; an even 50 to 50 makes the eye work to decide what is important.
Neutrals and accents to add
- A light neutral such as Salt (#F3F1EC) for backgrounds and large surfaces.
- A dark neutral such as Sooty (#111318) for text and the strongest contrast.
- A small accent such as Nordic Noir (#022D3B), from the split-complementary side of yellow, for one button or highlight.
Putting it in a layout
| Part of the page | Background | Text or detail | Contrast |
|---|---|---|---|
| Hero section | #142B5A | #FFFFFF | 13.78:1 |
| Cards | #F3F1EC | #111318 | 16.46:1 |
| Primary button | #3A2C02 | #FFFFFF | 13.62:1 |
| Footer | #111318 | #F3F1EC | 16.46:1 |
That layout gives blue the large areas and yellow the action. Every row reaches at least 4.5 to 1, so all the text is comfortable to read.
Extending the pair
Two colors rarely cover a whole design. Tints and shades of each give you more steps without introducing a third hue, so the pair stays recognizable.
Common mistakes
- Letting two dark colors touch with no light between them, so shapes and edges disappear. Add a light neutral.
- Relying on the difference between yellow and blue to carry meaning, such as success and error. About one in twelve men has trouble telling some hues apart, so add an icon or a label.
- Choosing the pair on a bright monitor and never checking it on a phone, in print or in a dim room.
As CSS
:root {
--yellow: #3A2C02;
--blue: #142B5A;
--paper: #F3F1EC;
--ink: #111318;
--accent: #022D3B;
}What the combination says
Yellow signals warning and caution signs and school buses and taxis. Blue signals links and primary actions in interfaces and information and mandatory-action signs. When both appear, viewers may read either meaning, depending on which leads, so check that the message you want is the one the proportions give.
Where it works
- Brands that want weight and depth.
- Highlights and finance.
- Presentations and posters where the pair carries the whole design.