# Color Blindness Simulator API
> See your colours the way colour-blind users do. Pass a hex colour (or a whole palette) and get back how it appears under each major colour-vision deficiency — protanopia (red-blind), deuteranopia (green-blind), tritanopia (blue-blind) and achromatopsia (total colour blindness) — as simulated hex and RGB values. Roughly 1 in 12 men and 1 in 200 women have some colour-vision deficiency, so this is ideal for accessibility testing of UI themes, charts, maps, status colours and branding: simulate your palette, spot colours that become indistinguishable, and fix them before you ship. Pure local matrix transforms — no key, no third-party service, instant. Live. 4 endpoints. Distinct from colour conversion and contrast tools.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/colorblind-api/..."
```

## Pricing
- **Free** (Free) — 1,520 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 29,000 calls/Mo, 8 req/s
- **Pro** ($27/Mo) — 184,000 calls/Mo, 20 req/s
- **Mega** ($63/Mo) — 940,000 calls/Mo, 50 req/s

## Endpoints

### Simulate

#### `GET /v1/palette` — Simulate a palette

**Parameters:**
- `colors` (query, required, string) — Comma-separated hex colours Example: `ff0000,00ff00,0000ff`
- `type` (query, optional, string) — protanopia|deuteranopia|tritanopia|achromatopsia|all

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colorblind-api/v1/palette?colors=ff0000%2C00ff00%2C0000ff"
```

**Response:**
```json
{
    "data": {
        "count": 3,
        "types": [
            "protanopia",
            "deuteranopia",
            "tritanopia",
            "achromatopsia"
        ],
        "results": [
            {
                "original": "#ff0000",
                "simulations": {
                    "protanopia": {
                        "hex": "#918e00",
                        "rgb": {
                            "b": 0,
                            "g": 142,
                            "r": 145
                        },
                        "label": "red-blind"
                    },
                    "tritanopia": {
                        "hex": "#f20000",
                        "rgb": {
                            "b": 0,
                            "g": 0,
                            "r": 242
                        },
                        "label": "blue-blind"
                    },
                    "deuteranopia": {
                        "hex": "#9fb300",
                        "rgb": {
                            "b": 0,
                            "g": 179,
                            "r": 159
                        },
                        "label": "green-blind"
                    },
                    "achromatopsia": {
                        "hex": "#4c4c4c",
                        "rgb": {
                            "b": 76,
                            "g": 76,
                            "r": 76
                        },
              
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/simulate` — Simulate a colour under CVD

**Parameters:**
- `color` (query, required, string) — Hex colour (with or without #) Example: `ff0000`
- `type` (query, optional, string) — protanopia|deuteranopia|tritanopia|achromatopsia|all

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colorblind-api/v1/simulate?color=ff0000"
```

**Response:**
```json
{
    "data": {
        "original": "#ff0000",
        "simulations": {
            "protanopia": {
                "hex": "#918e00",
                "rgb": {
                    "b": 0,
                    "g": 142,
                    "r": 145
                },
                "label": "red-blind"
            },
            "tritanopia": {
                "hex": "#f20000",
                "rgb": {
                    "b": 0,
                    "g": 0,
                    "r": 242
                },
                "label": "blue-blind"
            },
            "deuteranopia": {
                "hex": "#9fb300",
                "rgb": {
                    "b": 0,
                    "g": 179,
                    "r": 159
                },
                "label": "green-blind"
            },
            "achromatopsia": {
                "hex": "#4c4c4c",
                "rgb": {
                    "b": 76,
                    "g": 76,
                    "r": 76
                },
                "label": "total color blindness"
            }
        }
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.757Z",
        "request_id": "65bff257-167f-4c05-ab67-41d6665a6167"
    },
    "status": "ok",
    "message": "Simulate a colour",
    "success": true
}
```

### Reference

#### `GET /v1/types` — List deficiency types

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colorblind-api/v1/types"
```

**Response:**
```json
{
    "data": {
        "count": 4,
        "types": [
            {
                "type": "protanopia",
                "label": "red-blind"
            },
            {
                "type": "deuteranopia",
                "label": "green-blind"
            },
            {
                "type": "tritanopia",
                "label": "blue-blind"
            },
            {
                "type": "achromatopsia",
                "label": "total color blindness"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.839Z",
        "request_id": "7157d1be-a300-423c-80c9-21680af56aed"
    },
    "status": "ok",
    "message": "List deficiency types",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colorblind-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; this gateway requires x-api-key",
        "name": "Color Blindness Simulator API",
        "note": "Simulate how colours appear under colour-vision deficiencies. /v1/simulate?color=%23ff0000&type=all (types: protanopia, deuteranopia, tritanopia, achromatopsia, or all); /v1/palette?colors=%23ff0000,%2300ff00 to check a whole UI palette; /v1/types for the list. Returns the simulated hex/RGB per type. Instant, nothing stored. For accessibility testing — distinct from colour conversion/contrast.",
        "source": "Local CVD matrix simulation — no key, no upstream",
        "endpoints": 4
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.920Z",
        "request_id": "56b6b1be-6a12-40e7-820d-946be89492fc"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/colorblind-api
OpenAPI spec: https://www.oanor.com/api/colorblind-api/openapi.json
