graf1x

Black and Yellow

Tonal Accent color combination with 19.56:1 contrast ratio

#000000
#FFFF00

Color Values

Black
HEX #000000
RGB 0, 0, 0
HSL 0, 0%, 0%
Yellow
HEX #FFFF00
RGB 255, 255, 0
HSL 60, 100%, 50%

Harmony: Tonal Accent

One color is neutral and the other carries the chroma, which is a reliable formula for balanced design. The neutral gives the eye somewhere to rest while the chromatic color provides the focal point.

The hue angle between Black and Yellow is 60 degrees (though one or both colors are achromatic, so hue angle is less relevant than lightness contrast). You can explore these relationships interactively in our Color Wheel Tool.

WCAG Contrast

19.56:1
Black background with Yellow text
AAA all sizes

UI Preview

Black surface

Sample text on a black background demonstrates readability and visual hierarchy.

Yellow surface

Sample text on a yellow background demonstrates readability and visual hierarchy.

Design Tokens

CSS Variables

:root {
  --color-a: #000000;
  --color-b: #FFFF00;
  --color-a-rgb: 0, 0, 0;
  --color-b-rgb: 255, 255, 0;
}

JSON

{
  "name": "Black and Yellow",
  "colors": [
    {
      "name": "Black",
      "hex": "#000000",
      "rgb": [
        0,
        0,
        0
      ]
    },
    {
      "name": "Yellow",
      "hex": "#FFFF00",
      "rgb": [
        255,
        255,
        0
      ]
    }
  ],
  "harmony": "Tonal Accent",
  "contrastRatio": 19.56
}

Explore These Colors

Frequently Asked Questions

Do black and yellow go together?

Yes. Black and Yellow form a tonal accent color combination. One color is neutral and the other carries the chroma, which is a reliable formula for balanced design. The neutral gives the eye somewhere to rest while the chromatic color provides the focal point. The pairing has a WCAG contrast ratio of 19.56:1, which passes AA for large text and UI components.

What is the contrast ratio between black and yellow?

The WCAG 2.1 contrast ratio between Black (#000000) and Yellow (#FFFF00) is 19.56:1. This passes AAA for all text sizes.

How do I use black and yellow in design?

A safe starting point is the 60/30/10 rule: give one color about 60 percent of the surface area, the other about 30 percent, and reserve the remaining 10 percent for an accent or neutral. If one color is significantly darker, use it for text or structural elements and the lighter one for backgrounds. Test the result with our Contrast Checker if text is involved.

What are the hex and RGB values for black and yellow?

Black has the hex code #000000 and RGB values rgb(0, 0, 0). Yellow has the hex code #FFFF00 and RGB values rgb(255, 255, 0). You can copy these directly into CSS or use the design tokens provided on this page.