Find an API

Search public APIs with auth details & Postman guides

← All APIs

Accessible Colors API

accessible-colors.com · Developer Tools

Developer Tools No Auth Free & Open Accessibility Design Colors

Check WCAG accessibility contrast ratio between foreground and background colors. Validates AA and AAA compliance for text and large text. Free, no API key.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

POST Check contrast

Check if dark gray on white passes WCAG accessibility.

https://accessible-colors.com

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Content-Type application/json
Request Body — data you're sending
{
  "bold": false,
  "font_size": 16,
  "background": "#ffffff",
  "foreground": "#333333"
}
curl -X POST "https://accessible-colors.com/" \
  -H "Content-Type: application/json" \
  -H "Content-Type: application/json" \
  -d '{"bold":false,"font_size":16,"background":"#ffffff","foreground":"#333333"}'
import requests
headers = {
    "Content-Type": "application/json"
}
data = {
    "bold": false,
    "font_size": 16,
    "background": "#ffffff",
    "foreground": "#333333"
}
response = requests.post(
    "https://accessible-colors.com/",
    headers=headers,
    json=data,
)
print(response.json())
const url = 'https://accessible-colors.com/';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "bold": false,
  "font_size": 16,
  "background": "#ffffff",
  "foreground": "#333333"
}),
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"bytes"
	"encoding/json"
)

func main() {
	targetURL := "https://accessible-colors.com/"
	jsonData, _ := json.Marshal({"bold":false,"font_size":16,"background":"#ffffff","foreground":"#333333"})
	req, _ := http.NewRequest("POST", targetURL, bytes.NewBuffer(jsonData))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://accessible-colors.com/")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req["Content-Type"] = "application/json"
req.body = "{\"bold\":false,\"font_size\":16,\"background\":\"#ffffff\",\"foreground\":\"#333333\"}"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://accessible-colors.com/";
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "Content-Type: application/json",
        "Content-Type: application/json"
    ]),
    "content" => json_encode({"bold":false,"font_size":16,"background":"#ffffff","foreground":"#333333"}),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed
  2. POST to https://accessible-colors.com with foreground, background, font_size, bold
  3. Response includes contrast_ratio and isAccessible flag
  4. WCAG AA requires 4.5:1 for normal text, 3:1 for large text
  5. WCAG AAA requires 7:1 for normal text, 4.5:1 for large text

What can you build with Accessible Colors API?

Accessible Colors API is a Developer Tools API. Developers commonly use developer tools APIs for:

  • automating code review and quality checks
  • integrating CI/CD pipelines and build systems
  • managing feature flags and A/B tests
  • monitoring errors and application performance
  • generating and validating test data

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Accessible Colors API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗