Color contrast checker

Pick a text color and a background. Preview the pair and see which WCAG 2 contrast thresholds it meets for text and icons.

Input

No key required

Result

Example

Large text, 24 pixels

Normal text, the kind you read in paragraphs. The cat sat on the keyboard and nothing was saved.

4.47:1 contrast ratio

  • AA, normal textFail
  • AA, large textPass
  • AA, icons and bordersPass
  • AAA, normal textFail
  • AAA, large textFail
Full response
{
  "foreground": "#777777",
  "background": "#ffffff",
  "ratio": 4.47,
  "aa": {
    "normalText": false,
    "largeText": true,
    "nonText": true
  },
  "aaa": {
    "normalText": false,
    "largeText": false
  }
}

Run with curl

Copy this command to run the request in your terminal. It updates as you edit the input.

For higher limits, get a free API key and add -H "Authorization: Bearer $KAMINEKO_API_KEY".

GET /v1/color/contrast
curl 'https://api.kamineko.dev/v1/color/contrast?foreground=%23777777&background=%23ffffff'

Use with MCP

Set KAMINEKO_API_KEY to your key and run this command to connect Claude Code. Try the color_contrast tool with this prompt.

Is #777 text on white readable enough for WCAG AA?
MCP https://api.kamineko.dev/mcp
claude mcp add --transport http kamineko \
  https://api.kamineko.dev/mcp \
  --header "Authorization: Bearer $KAMINEKO_API_KEY"

Usage notes

  • AA needs 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold) and icons. AAA needs 7:1 and 4.5:1.
  • A translucent text color is blended over the background first.