Back to home

API Documentation

Complete reference for the Color API. Test endpoints interactively with your API key, view code examples, and understand response formats.

Quick Start

Base URL

https://color.endpnt.dev/api/v1

Authentication

Include your API key in the x-api-key header. Get your API key from the pricing page.

Response Format

All endpoints return JSON with a consistent structure including success,data, and meta fields.

Format Conversion

Convert colors between different formats (hex, rgb, hsl, hwb, lab, lch, oklch, etc.)

POST/api/v1/convert

Try it out

Get your API key from the pricing page

Response

Fill in the parameters and click "Test API" to see the response

Code Examples

curl -X POST https://color.endpnt.dev/api/v1/convert \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "#D946EF",
    "to": "oklch"
  }'

Contrast Analysis

Analyze color contrast using WCAG 2.1 and APCA algorithms for accessibility compliance

POST/api/v1/contrast

Try it out

Get your API key from the pricing page

Response

Fill in the parameters and click "Test API" to see the response

Code Examples

curl -X POST https://color.endpnt.dev/api/v1/contrast \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "foreground": "#D946EF",
    "background": "#ffffff",
    "algorithm": "both"
  }'

Color Harmony

Generate complementary, triadic, analogous, and other color harmony schemes

POST/api/v1/harmony

Try it out

Get your API key from the pricing page

Response

Fill in the parameters and click "Test API" to see the response

Code Examples

curl -X POST https://color.endpnt.dev/api/v1/harmony \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "#D946EF",
    "type": "complementary"
  }'

Palette Generation

Generate a palette algorithmically from a single seed color (Starter+ required)

POST/api/v1/palette

Try it out

Get your API key from the pricing page

Response

Fill in the parameters and click "Test API" to see the response

Code Examples

curl -X POST https://color.endpnt.dev/api/v1/palette \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "#3B82F6",
    "algorithm": "tints",
    "count": 5
  }'

Color Blindness Simulation

Simulate how colors appear to users with different types of color blindness

POST/api/v1/blindness

Try it out

Get your API key from the pricing page

Response

Fill in the parameters and click "Test API" to see the response

Code Examples

curl -X POST https://color.endpnt.dev/api/v1/blindness \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "#D946EF",
    "type": "protanopia"
  }'

Error Codes

Client Errors (4xx)

INVALID_COLOR_FORMAT - Invalid color format
MISSING_REQUIRED_FIELD - Required parameter missing
UNSUPPORTED_OPERATION - Unsupported operation
RATE_LIMITED - Rate limit exceeded

Server Errors (5xx)

PROCESSING_ERROR - Error processing request
SERVICE_UNAVAILABLE - Service temporarily unavailable

Rate Limits

Free Tier

100
requests/month

Starter

10K
requests/month

Pro

100K
requests/month