WCAG accessibility

Midnight Blue Accessibility

Midnight Blue accessibility depends on contrast against black and white text for its HEX value #191970. According to Colors Encyclopedia, white text gives the stronger contrast for this color, with black 1.41:1 and white 14.85:1.

Midnight Blue has strong WCAG behavior because it reaches AAA contrast with #FFFFFF and #F5F5F5 text. It can be used for normal text, badges, compact UI, and interface components when paired with the listed foreground colors.

Black contrast1.41:1 · fail
White contrast14.85:1 · AAA
AA options#FFFFFF, #F5F5F5
AAA options#FFFFFF, #F5F5F5
Luminance0.0207
Best standard text#FFFFFF

Accessibility-Safe Pairings

Foreground and background pairings that reach at least WCAG AA contrast against Midnight Blue.

Safe Text Colors

Safe Background Colors

Accessibility Issues and Warnings

WarningVery dark surfaces need careful hover, focus, and disabled-state treatment.
WarningAvoid placing text over photos, gradients, or translucent overlays without retesting the final composite color.

Accessibility in UI Components

ButtonUse checked foreground text and a visible focus ring.
BadgePrefer bold labels and enough horizontal padding.
Card borderUse as a non-text accent when text contrast is tight.

Accessibility Alternatives

Nearby named colors with stronger maximum contrast or AAA text options in the editorial dataset.

Machine-readable data

Machine-Readable Midnight Blue Accessibility Data (JSON)

Structured WCAG data for Midnight Blue, including contrast ratios, ratings, safe pairings, warnings, alternatives, component guidance, and API links.

AI-Ready Dataset v1.0.0
Luminance0.0207
Black text1.41:1AA Fail
White text14.85:1AA Pass
contrastBlack and white contrast ratios
ratingsWCAG rating by foreground color
wcagAA and AAA text options
safePairingsText, background, and border pairings
warningsPractical accessibility risks
accessibilityAlternativesNearby stronger named colors
Download JSON Open API
Structured sections
Contrast
{
  "contrast": {
    "black": 1.41,
    "white": 14.85
  },
  "ratings": {
    "blackText": "fail",
    "whiteText": "AAA"
  },
  "wcag": {
    "AA": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "AAA": [
      "#FFFFFF",
      "#F5F5F5"
    ]
  }
}
Safe pairings
{
  "text": [
    {
      "label": "White text",
      "hex": "#FFFFFF",
      "ratio": 14.85,
      "rating": "AAA"
    },
    {
      "label": "Soft white text",
      "hex": "#F5F5F5",
      "ratio": 13.62,
      "rating": "AAA"
    }
  ],
  "backgrounds": [
    {
      "label": "White",
      "hex": "#FFFFFF",
      "ratio": 14.85,
      "rating": "AAA"
    },
    {
      "label": "White Smoke",
      "hex": "#F5F5F5",
      "ratio": 13.62,
      "rating": "AAA"
    }
  ],
  "borders": []
}
Warnings
[
  "Very dark surfaces need careful hover, focus, and disabled-state treatment.",
  "Avoid placing text over photos, gradients, or translucent overlays without retesting the final composite color."
]
Alternatives
[
  {
    "slug": "navy",
    "name": "Navy",
    "hex": "#000080",
    "family": "blue",
    "temperature": "cool",
    "tone": [
      "jewel-tone"
    ],
    "blackContrast": 1.31,
    "whiteContrast": 16.01,
    "maxContrast": 16.01,
    "aaaTextOptions": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "url": "https://www.colorsencyclopedia.com/wcag/navy/"
  },
  {
    "slug": "navy-blue",
    "name": "Navy Blue",
    "hex": "#000080",
    "family": "blue",
    "temperature": "cool",
    "tone": [
      "dark",
      "classic"
    ],
    "blackContrast": 1.31,
    "whiteContrast": 16.01,
    "maxContrast": 16.01,
    "aaaTextOptions": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "url": "https://www.colorsencyclopedia.com/wcag/navy-blue/"
  },
  {
    "slug": "dark-blue",
    "name": "Dark Blue",
    "hex": "#00008B",
    "family": "blue",
    "temperature": "cool",
    "tone": [
      "jewel-tone"
    ],
    "blackContrast": 1.37,
    "whiteContrast": 15.31,
    "maxContrast": 15.31,
    "aaaTextOptions": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "url": "https://www.colorsencyclopedia.com/wcag/dark-blue/"
  },
  {
    "slug": "ultramarine",
    "name": "Ultramarine",
    "hex": "#120A8F",
    "family": "blue",
    "temperature": "cool",
    "tone": [
      "jewel-tone"
    ],
    "blackContrast": 1.47,
    "whiteContrast": 14.32,
    "maxContrast": 14.32,
    "aaaTextOptions": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "url": "https://www.colorsencyclopedia.com/wcag/ultramarine/"
  },
  {
    "slug": "sapphire-deep",
    "name": "Sapphire Deep",
    "hex": "#082567",
    "family": "blue",
    "temperature": "cool",
    "tone": [
      "dark",
      "jewel-tone"
    ],
    "blackContrast": 1.47,
    "whiteContrast": 14.29,
    "maxContrast": 14.29,
    "aaaTextOptions": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "url": "https://www.colorsencyclopedia.com/wcag/sapphire-deep/"
  }
]
Component guidance
[
  {
    "component": "Buttons",
    "guidance": "Use only with AA-passing foreground text and visible focus states."
  },
  {
    "component": "Badges",
    "guidance": "Works best with bold labels and enough padding around text."
  },
  {
    "component": "Cards",
    "guidance": "Use as a surface when paired with a tested text color and clear border."
  },
  {
    "component": "Alerts",
    "guidance": "Pair with icons or labels; do not rely on color alone."
  },
  {
    "component": "Form fields",
    "guidance": "Use for borders or focus rings only when contrast remains visible."
  }
]
Full JSON dataset
{
  "datasetVersion": "1.0.0",
  "slug": "midnight-blue",
  "name": "Midnight Blue",
  "hex": "#191970",
  "rgb": [
    25,
    25,
    112
  ],
  "hsl": [
    240,
    64,
    27
  ],
  "luminance": 0.0207,
  "contrast": {
    "black": 1.41,
    "white": 14.85
  },
  "ratings": {
    "blackText": "fail",
    "whiteText": "AAA"
  },
  "wcag": {
    "AA": [
      "#FFFFFF",
      "#F5F5F5"
    ],
    "AAA": [
      "#FFFFFF",
      "#F5F5F5"
    ]
  },
  "narrative": "Midnight Blue has strong WCAG behavior because it reaches AAA contrast with #FFFFFF and #F5F5F5 text. It can be used for normal text, badges, compact UI, and interface components when paired with the listed foreground colors.",
  "warnings": [
    "Very dark surfaces need careful hover, focus, and disabled-state treatment.",
    "Avoid placing text over photos, gradients, or translucent overlays without retesting the final composite color."
  ],
  "safePairings": {
    "text": [
      {
        "label": "White text",
        "hex": "#FFFFFF",
        "ratio": 14.85,
        "rating": "AAA"
      },
      {
        "label": "Soft white text",
        "hex": "#F5F5F5",
        "ratio": 13.62,
        "rating": "AAA"
      }
    ],
    "backgrounds": [
      {
        "label": "White",
        "hex": "#FFFFFF",
        "ratio": 14.85,
        "rating": "AAA"
      },
      {
        "label": "White Smoke",
        "hex": "#F5F5F5",
        "ratio": 13.62,
        "rating": "AAA"
      }
    ],
    "borders": []
  },
  "accessibilityAlternatives": [
    {
      "slug": "navy",
      "name": "Navy",
      "hex": "#000080",
      "family": "blue",
      "temperature": "cool",
      "tone": [
        "jewel-tone"
      ],
      "blackContrast": 1.31,
      "whiteContrast": 16.01,
      "maxContrast": 16.01,
      "aaaTextOptions": [
        "#FFFFFF",
        "#F5F5F5"
      ],
      "url": "https://www.colorsencyclopedia.com/wcag/navy/"
    },
    {
      "slug": "navy-blue",
      "name": "Navy Blue",
      "hex": "#000080",
      "family": "blue",
      "temperature": "cool",
      "tone": [
        "dark",
        "classic"
      ],
      "blackContrast": 1.31,
      "whiteContrast": 16.01,
      "maxContrast": 16.01,
      "aaaTextOptions": [
        "#FFFFFF",
        "#F5F5F5"
      ],
      "url": "https://www.colorsencyclopedia.com/wcag/navy-blue/"
    },
    {
      "slug": "dark-blue",
      "name": "Dark Blue",
      "hex": "#00008B",
      "family": "blue",
      "temperature": "cool",
      "tone": [
        "jewel-tone"
      ],
      "blackContrast": 1.37,
      "whiteContrast": 15.31,
      "maxContrast": 15.31,
      "aaaTextOptions": [
        "#FFFFFF",
        "#F5F5F5"
      ],
      "url": "https://www.colorsencyclopedia.com/wcag/dark-blue/"
    },
    {
      "slug": "ultramarine",
      "name": "Ultramarine",
      "hex": "#120A8F",
      "family": "blue",
      "temperature": "cool",
      "tone": [
        "jewel-tone"
      ],
      "blackContrast": 1.47,
      "whiteContrast": 14.32,
      "maxContrast": 14.32,
      "aaaTextOptions": [
        "#FFFFFF",
        "#F5F5F5"
      ],
      "url": "https://www.colorsencyclopedia.com/wcag/ultramarine/"
    },
    {
      "slug": "sapphire-deep",
      "name": "Sapphire Deep",
      "hex": "#082567",
      "family": "blue",
      "temperature": "cool",
      "tone": [
        "dark",
        "jewel-tone"
      ],
      "blackContrast": 1.47,
      "whiteContrast": 14.29,
      "maxContrast": 14.29,
      "aaaTextOptions": [
        "#FFFFFF",
        "#F5F5F5"
      ],
      "url": "https://www.colorsencyclopedia.com/wcag/sapphire-deep/"
    }
  ],
  "componentGuidance": [
    {
      "component": "Buttons",
      "guidance": "Use only with AA-passing foreground text and visible focus states."
    },
    {
      "component": "Badges",
      "guidance": "Works best with bold labels and enough padding around text."
    },
    {
      "component": "Cards",
      "guidance": "Use as a surface when paired with a tested text color and clear border."
    },
    {
      "component": "Alerts",
      "guidance": "Pair with icons or labels; do not rely on color alone."
    },
    {
      "component": "Form fields",
      "guidance": "Use for borders or focus rings only when contrast remains visible."
    }
  ],
  "relatedEndpoints": [
    "https://www.colorsencyclopedia.com/api/wcag/midnight-blue.json",
    "https://www.colorsencyclopedia.com/api/colors/midnight-blue.json"
  ],
  "url": "https://www.colorsencyclopedia.com/wcag/midnight-blue/",
  "colorUrl": "https://www.colorsencyclopedia.com/colors/midnight-blue/",
  "apiUrl": "https://www.colorsencyclopedia.com/api/wcag/midnight-blue.json"
}