# ContrastKit > Check WCAG color contrast (AA, AAA, large text, non-text UI), get the nearest accessible color for a failing pair, convert CSS colors and check every pair in a palette. Free web tool, JSON API and a remote MCP server for AI agents. Pure computation: no sign-up, no API key, nothing stored. ## For AI agents - [MCP server](https://contrastkit.mike-tusa.workers.dev/mcp): remote MCP over Streamable HTTP (POST only, stateless, JSON responses). Protocol versions: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05. Tools: `check_contrast`, `suggest_accessible_color`, `convert_color`, `check_palette`. All read-only. Client config (most MCP clients accept this; some use a different format, for example VS Code uses a `servers` key): `{"mcpServers":{"contrastkit":{"type":"http","url":"https://contrastkit.mike-tusa.workers.dev/mcp"}}}` - [OpenAPI 3.1 spec](https://contrastkit.mike-tusa.workers.dev/openapi.json): machine-readable description of the JSON API - [MCP server card](https://contrastkit.mike-tusa.workers.dev/.well-known/mcp/server-card.json): static description of the MCP server and its tools - Works with AI agents and assistants that can call an MCP server or a JSON API, for example Muse, Claude, ChatGPT or Cursor (descriptive only). ContrastKit is not affiliated with, endorsed by or sponsored by the W3C, WebAIM, Meta, Anthropic, OpenAI or Anysphere. WCAG is a W3C standard; a passing ratio is one part of accessibility, not a full audit. ## JSON API (all GET, JSON responses) - `GET https://contrastkit.mike-tusa.workers.dev/api/contrast?fg=%23777777&bg=%23ffffff`: { foreground, background (each { hex, rgb, hsl, alpha, luminance }), effectiveForeground, effectiveBackground, ratio, ratioExact, pass { aa, aa_large, aaa, aaa_large, ui }, notes[] }. - `GET https://contrastkit.mike-tusa.workers.dev/api/suggest?fg=%23777777&bg=%23ffffff&level=aa&adjust=foreground`: the contrast result plus { level, target, adjust, alreadyPasses, suggestions [ { adjust, color, ratio, lightnessChange } ] }. adjust = foreground (default) | background | both. - `GET https://contrastkit.mike-tusa.workers.dev/api/convert?color=rebeccapurple`: { input, hex, rgb, hsl, alpha, luminance, contrastOnWhite, contrastOnBlack, bestTextColor }. - `GET https://contrastkit.mike-tusa.workers.dev/api/palette?colors=%23ffffff|%23111827|%231a73e8&level=aa`: 2-12 colors separated by | (or repeat color=). { level, target, colors[], count, passing, pairs [ { a, b, ratio, passes } ] } highest ratio first. - Aliases: foreground=fg, background=bg. level: aa | aa-large | aaa | aaa-large | ui (default aa). - `GET https://contrastkit.mike-tusa.workers.dev/api/health`: { ok, version }. - Errors: { "error": { "code", "message", "field"? } } with 400 invalid_input / invalid_color, 404 not_found, 405 method_not_allowed, 429 rate_limited (Retry-After). - Colors: #rgb, #rgba, #rrggbb, #rrggbbaa (the # may be omitted; URL-encode it as %23), rgb()/rgba() and hsl()/hsla() in comma or space syntax with optional alpha (0-1 or %), the 148 CSS color names and transparent. Max 64 characters per color. Not supported: lab(), lch(), oklch(), color(), currentColor, system colors. - Contrast ratio = (L1 + 0.05) / (L2 + 0.05) with WCAG 2.x relative luminance (sRGB). Levels: aa 4.5:1, aa-large 3:1, aaa 7:1, aaa-large 4.5:1, ui 3:1 (aa = SC 1.4.3 normal text, aa-large = 18pt / 14pt bold text, aaa = SC 1.4.6, ui = SC 1.4.11 non-text). Ratios are floored to 2 decimals and pass/fail uses the exact value, so 4.499:1 fails AA. A translucent foreground is blended over the background; a translucent background is blended over white. ## Limits and pricing - No API key and no sign-up. About 60 checks per minute per IP across all /api routes and MCP tools/call (HTTP 429 + Retry-After). Free; there is no paid tier on this site. - The MCP endpoint uses the same limiter: each `tools/call` is one check. Non-check MCP messages don't count as checks, but are capped at about 120/min per IP (HTTP 429 + Retry-After). MCP request bodies are limited to 65536 bytes. - Colors you submit are processed in memory and discarded when the response is sent. They are never written to storage, logs or analytics, and ContrastKit makes no network requests. ## Optional - [Privacy](https://contrastkit.mike-tusa.workers.dev/privacy) - [Terms](https://contrastkit.mike-tusa.workers.dev/terms) - Contact: digitalpromohub.support@gmail.com