On this page
That is why it appears on hazard tape, tool brands, sports kits and wasps. This page gives you the exact codes, the nearby yellows worth knowing, contrast numbers, CSS, print notes and four palettes to copy.
Black and Yellow Hex, RGB, HSL and CMYK Codes
Both colors sit at the edges of the RGB cube. Black is zero light on all three channels. is full red and full green with no blue, which makes it a cool, lemony yellow rather than a golden one. The strip above lets you copy either code, and the live preview shows them as background, text and button with a contrast score.
| Format | Black | Yellow |
|---|---|---|
| HEX | ||
| RGB | 0, 0, 0 | 255, 255, 0 |
| HSL | 0°, 0%, 0% | 60°, 100%, 50% |
| CMYK (simple) | 0, 0, 0, 100 | 0, 0, 100, 0 |
The CMYK values are the plain textbook conversion. Real print profiles give different numbers, and I cover that in the print section. In CSS the keywords black and yellow map to exactly these two codes, so you can use either form.
Which Yellow? Shades That Change the Whole Mood
Pure is a loud choice. It works for warnings, highlights and small bursts of energy, but over a large area it gets harsh quickly. Most polished black and yellow designs use a slightly warmer yellow and keep the pure one for moments that need to shout.
Here are the yellows I reach for most, and how each one behaves next to black:
- Lemon : clean and bright, a good fit for tech and sport.
- Gold : richer and more premium, common in team colors.
- Amber : warm and urgent, ideal for hazard stripes and alerts.
- Mustard : softer and a little vintage, nice for packaging and interiors.
- Safety yellow : slightly muted, which is why it holds up on signs and workwear.
The black side matters too. Pure gives the hardest edge, while or feels softer on screens and lets the yellow glow rather than vibrate. If you push the black toward brown instead, you get a warmer, earthier mood, which is worth exploring in brown and black.
Why Black and Yellow Gets Noticed First
The pairing works because it has the biggest lightness gap that yellow can make. Yellow is the lightest of the saturated hues, and black is the darkest of all colors, so the eye picks out the edge between them faster than almost any other pair. It does not depend on hue, which is why it still reads for most people with color vision differences.
Nature got there first. Wasps, hornets and many beetles use yellow and black stripes as a warning, and people have borrowed the signal ever since. Warning signs under ISO 3864 use a yellow background with black symbols and borders, and hazard tape and road barriers follow the same logic.
The Tour de France began in 1903, and its yellow leader's jersey is a nod to the newspaper L'Auto, which organised the first race.
Black and yellow also carries older heraldic weight in parts of Europe, and that history is why it still feels official on a sports crest. When you want both urgency and authority in one glance, nothing else comes close.
Black and Yellow Contrast: What WCAG Says
WCAG 2.x asks for at least 4.5:1 for normal text and 3:1 for large text and interface components. AAA asks for 7:1 for normal text. Black and yellow clears all of these easily, but only if black is the text color.
Which text color is safe on a pure #FFFF00 button?
Black on #FFFF00 scores 19.56:1, while white scores only 1.07:1 because yellow is almost as light as white.
I computed these ratios from the relative luminance of each color:
- Black on yellow : 19.56:1
- Black on gold-leaning : 14.87:1
- Yellow on near-black : 16.21:1
- White on yellow : 1.07:1
That last line is where projects go wrong. Yellow is almost as light as white, so white text on yellow is nearly invisible. On a dashboard I inherited, the warning chips used white labels on yellow, and swapping the label color to black fixed the contrast with no other change. The same applies in reverse: yellow text on a white page fails badly, so keep yellow for backgrounds or for text on dark surfaces.
Using Black and Yellow in Web and UI Design
The most reliable pattern is a dark interface with yellow reserved for the one thing you want clicked. Use for the page, for cards, off-white for body text and a single yellow like for buttons, links and active states. Because the yellow is the only saturated color, it becomes the obvious action.

On light pages, flip the roles. Use white or as the background, black for text, and fill yellow areas such as banners and badges with black type on top. Do not use yellow as a thin line or icon on white, because it has a contrast of just 1.07:1 there.
:root {
--black: #000000;
--yellow: #FFFF00;
}
.btn {
background: var(--yellow);
color: var(--black);
border: 2px solid var(--black);
}
.hazard {
background: repeating-linear-gradient(
45deg, #000000 0 20px, #FFFF00 20px 40px
);
}
:focus-visible {
outline: 3px solid #FFFF00;
outline-offset: 2px;
}
The yellow focus ring only works on dark backgrounds. On a light page, use a black outline instead.
Try this: Take one screen of your design and replace every yellow element with , then with . Squint at both versions and pick the one where the main button still stands out but the page does not feel like it is flashing.
Black and Yellow Branding and Sports Colors
Black and yellow suits brands that want to look strong and approachable at once. Yellow brings optimism and speed, and black adds weight and seriousness. Tool makers such as DeWalt use it so products stand out in a workshop. Post-it uses it on its Super Sticky line to set those notes apart from the standard yellow pad.
Fiction has taken it up as well. The Batman emblem, a black bat on a yellow oval, is one of the best-known examples. In sport, Borussia Dortmund, the Pittsburgh Steelers, the Boston Bruins and the Pittsburgh Pirates all lean on black and gold. Most of these teams use a gold-leaning yellow rather than , which prints better on fabric and looks richer on a pitch.
When I built a color system for a logistics client, we tested pure yellow against a warmer . The warm one looked more trustworthy on trucks and was easier on the eye in the app. A brand that wants a cooler, more modern edge can add a deep blue, as in blue and black, but keep yellow as the lead.
Printing Black and Yellow Without Surprises
Screens and presses do not agree on yellow. Pure is a light-emitting color, and there is no fixed conversion from CMYK to RGB, since different inks produce different yellows. In practice, 0/0/100/0 on paper is often a little duller than the same yellow on a monitor, and uncoated stock softens it further.
For a large solid black area in print, what usually looks deepest?
A rich black adds cyan, magenta and yellow under the black ink, which gives a denser, deeper result on large areas.
I once approved a flyer from a screen mockup, and the printed yellow came back more mustard than the bright lemon I had on screen. Now I always order a proof, and I choose a yellow that suits the paper rather than chasing the monitor value.
For black, use 100% K for small text and thin lines, because adding other inks makes tiny type blur if the plates shift slightly. For large solid black areas, a rich black (black with some cyan, magenta and yellow underneath) looks deeper than K alone. Ask your printer for their preferred recipe rather than guessing.
What Happens When You Mix Black and Yellow
Mix the two as paint and you do not get dark yellow. You get an olive green, because yellow darkened with black loses its warmth and drifts toward green. On screen, an even blend of and lands on , a clear olive.

That has a design consequence for gradients. A straight gradient from yellow to black passes through murky olive tones in the middle, which can look muddy. If you want a cleaner fade, add an amber stop such as or a brown-leaning stop, or use hard stops for a striped effect. For an in-depth look at those olive and khaki midtones, see this khaki gradient guide.
Colors That Sit Well Next to Black and Yellow
Black and yellow already has maximum contrast, so extra colors should calm it down, not compete with it. These are the supporting colors that work best:
- White or off-white (): gives the eye somewhere to rest and keeps layouts from feeling heavy.
- Mid gray (): good for secondary text and borders on dark backgrounds.
- Blue or navy: the traditional complement of yellow is purple or blue-violet, so a deep blue makes the yellow look warmer.
- Green: a natural partner for olive and lime tones, as explored in black and green.
- Red and blue together: a bold, playful system, as in red, yellow and blue.
A simple rule keeps it balanced: about 60% black or a dark neutral, 30% white or gray, and 10% yellow. In interiors, that might mean matte black cabinetry, pale walls and a single mustard chair. In fashion, it is a yellow scarf or bag on a black coat. A black outfit with one bright yellow piece looks intentional, while head-to-toe stripes start to look like a warning sign.
Five Ready-Made Black and Yellow Palettes
These palettes cover the main moods of the combination: hazard-bright, dark and refined, warm and crafted, and cool and techy. Each one keeps yellow as the accent and gives you neutrals to build layouts around.
Signage, event posters and bold hazard-style landing pages.
Dashboards and apps that want one yellow accent on a dark base.
Packaging, cafe menus and warm brand identities with a crafted feel.
Tech brands and event graphics that need a cool, deep supporting tone.
Caution Tape is the loud one, best for posters and signage. Dark Mode Gold suits apps. Honeycomb softens everything with mustard and gold. Night Shift adds a deep navy for a more serious look, and if you like it, navy and black explores that dark-on-dark direction further.
Shades that keep this combination working
Black and Yellow Color Palette: questions people ask
What are the hex codes for black and yellow?
Black is #000000 and pure yellow is #FFFF00. If pure yellow feels too sharp, #FFD60A and #FACC15 are warmer options that still work with black.
Is black and yellow a good color combination?
Yes, as long as black carries the text and yellow acts as the highlight. Black on #FFFF00 has a 19.56:1 contrast ratio, so it is very easy to read.
What color do black and yellow make when mixed?
In paint, black added to yellow shifts it toward olive green rather than a darker yellow. On screen, a 50% blend of #FFFF00 and #000000 gives #808000, an olive.
What does black and yellow mean?
Together they signal attention and caution, from hazard tape to wasps. They can also read as energetic and confident, depending on how much yellow you use.
Can I put white text on yellow?
It is not a good idea. White on #FFFF00 has a contrast ratio of only 1.07:1, which fails every WCAG level. Use black or a very dark gray on yellow instead.
Keep exploring
- Pink and Purple Color Combination: Palettes and Hex Codes
- Orange and Black Color Scheme: Palettes and Hex Codes
- Black and Grey Color Combination: Palettes and Hex Codes
- Yellow and Blue Color Scheme: Palettes and Hex Codes
- Orange and Brown Color Combination: Palettes and Hex Codes
- Purple and Gold Color Palette: Combinations and Hex Codes
- Honey Blonde Color: Hex Code, RGB and Palettes
- Light Green Color: Hex Code, RGB and Palettes