graf1x

MidnightBlue and Yellow

Complementary color combination with 13.83:1 contrast ratio

#191970
#FFFF00

Color Values

MidnightBlue
HEX #191970
RGB 25, 25, 112
HSL 240, 64%, 27%
Yellow
HEX #FFFF00
RGB 255, 255, 0
HSL 60, 100%, 50%

Harmony: Complementary

These colors sit opposite each other on the wheel, producing maximum visual contrast. Complementary pairings are vibrant and attention-grabbing, but a 70/30 split keeps them from shouting.

The hue angle between MidnightBlue and Yellow is 180 degrees. You can explore these relationships interactively in our Color Wheel Tool.

WCAG Contrast

13.83:1
MidnightBlue background with Yellow text
AAA all sizes

UI Preview

MidnightBlue surface

Sample text on a midnightblue 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: #191970;
  --color-b: #FFFF00;
  --color-a-rgb: 25, 25, 112;
  --color-b-rgb: 255, 255, 0;
}

JSON

{
  "name": "MidnightBlue and Yellow",
  "colors": [
    {
      "name": "MidnightBlue",
      "hex": "#191970",
      "rgb": [
        25,
        25,
        112
      ]
    },
    {
      "name": "Yellow",
      "hex": "#FFFF00",
      "rgb": [
        255,
        255,
        0
      ]
    }
  ],
  "harmony": "Complementary",
  "contrastRatio": 13.83
}

Explore These Colors

Frequently Asked Questions

Do midnightblue and yellow go together?

Yes. MidnightBlue and Yellow form a complementary color combination. These colors sit opposite each other on the wheel, producing maximum visual contrast. Complementary pairings are vibrant and attention-grabbing, but a 70/30 split keeps them from shouting. The pairing has a WCAG contrast ratio of 13.83:1, which passes AA for large text and UI components.

What is the contrast ratio between midnightblue and yellow?

The WCAG 2.1 contrast ratio between MidnightBlue (#191970) and Yellow (#FFFF00) is 13.83:1. This passes AAA for all text sizes.

How do I use midnightblue 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. Since these are complementary colors, lean toward a 70/25/5 split to keep the contrast from becoming overwhelming. Test the result with our Contrast Checker if text is involved.

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

MidnightBlue has the hex code #191970 and RGB values rgb(25, 25, 112). 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.