Public API

Documentation for MixBlob’s color and palette endpoints.

Use the public API to convert colors, extract palettes, generate gradients, and bring MixBlob’s color workflow into your own products.

Colors: Contrast

Compute WCAG contrast ratio between two colors.

Request

curl -X POST https://api.mixipaint.com/v1/colors/contrast \
+  -H "content-type: application/json" \
+  -H "x-api-key: YOUR_API_KEY" \
+  -d '{"fg":"#111111","bg":"#ffffff"}'

Body

{
  "fg": "#111111",
  "bg": "#ffffff"
}

Response

{
  "ratio": 12.3,
  "AA": true,
  "AAA": true,
  "APASS_LargeText": true
}

Errors

  • 400 invalid body or colors
  • 401 missing API key

Rate Limits

Basic: 60 req/min (burst 100), 10,000/month. Pro: higher limits.