Color API

RESTful API for color processing

Integrate powerful color tools into your applications. Convert colors, analyze accessibility, generate palettes, and access our comprehensive car color database.

Quick Start

# Get your API key
curl -X POST https://api.paintcalculators.com/auth/register
# Make your first request
curl -H "Authorization: Bearer YOUR_KEY" \
https://api.paintcalculators.com/v1/color/convert

Authentication

API Key Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Free Tier Limits

  • • 1,000 requests per month
  • • 10 requests per minute
  • • Basic color conversion
  • • Standard support

Pro Tier Benefits

  • • 100,000 requests per month
  • • 100 requests per minute
  • • All endpoints access
  • • Priority support

API Endpoints

POST/api/v1/color/convert

Convert colors between different formats

Parameters

colorstringrequired

Input color in any supported format

fromstringrequired

Source format (hex, rgb, hsl, cmyk)

tostring[]required

Target formats array

Example

Request
{ "color": "#3B82F6", "from": "hex", "to": [ "rgb", "hsl", "cmyk" ] }
Response
{ "success": true, "data": { "hex": "#3B82F6", "rgb": "rgb(59, 130, 246)", "hsl": "hsl(217, 91%, 60%)", "cmyk": "cmyk(76%, 47%, 0%, 4%)" } }
POST/api/v1/color/analyze

Analyze color properties and accessibility

Parameters

colorstringrequired

Color to analyze in hex format

backgroundstring

Background color for contrast analysis

Example

Request
{ "color": "#3B82F6", "background": "#FFFFFF" }
Response
{ "success": true, "data": { "color": "#3B82F6", "luminance": 0.2126, "contrast_ratio": 4.56, "wcag_aa": true, "wcag_aaa": false, "psychology": { "primary_emotion": "trust", "secondary_emotions": [ "calm", "professional" ], "energy_level": "medium" } } }
POST/api/v1/color/palette

Generate color palettes using color theory

Parameters

base_colorstringrequired

Base color in hex format

schemestringrequired

Color scheme (complementary, analogous, triadic, etc.)

countnumber

Number of colors to generate (default: 5)

Example

Request
{ "base_color": "#3B82F6", "scheme": "complementary", "count": 5 }
Response
{ "success": true, "data": { "scheme": "complementary", "colors": [ { "hex": "#3B82F6", "role": "primary" }, { "hex": "#F6823B", "role": "complement" }, { "hex": "#8B3BF6", "role": "accent1" }, { "hex": "#3BF682", "role": "accent2" }, { "hex": "#F63B82", "role": "accent3" } ] } }
GET/api/v1/car-colors/{brand}

Get car color database for specific brand

Parameters

brandstringrequired

Car brand (tesla, bmw, mercedes-benz, audi, etc.)

modelstring

Specific model filter

yearstring

Year filter

Example

Request
GET /api/v1/car-colors/tesla?model=model-3
Response
{ "success": true, "data": { "brand": "Tesla", "model": "Model 3", "colors": [ { "name": "Pearl White Multi-Coat", "code": "PPSW", "hex": "#F7F7F7", "finish": "Pearl Multi-Coat", "availability": [ "Model 3", "Model Y" ] } ] } }
POST/api/v1/color/match

Find closest matching colors from database

Parameters

colorstringrequired

Target color in hex format

databasestring

Database to search (car-colors, pantone, ral)

tolerancenumber

Matching tolerance (0-100, default: 10)

Example

Request
{ "color": "#3B82F6", "database": "car-colors", "tolerance": 15 }
Response
{ "success": true, "data": { "matches": [ { "name": "BMW Storm Bay", "code": "C1M", "hex": "#1E3A8A", "similarity": 92.5, "delta_e": 3.2 } ] } }

Ready to Get Started?

Sign up for free and start integrating powerful color tools into your applications.