API Documentation

Introduction

Welcome to the colordesigntool.site API documentation. Our API allows developers to integrate our color and design tools into their own applications. This documentation provides information about available endpoints, request/response formats, and authentication requirements.

Authentication

To use the colordesigntool.site API, you'll need an API key. You can obtain one by contacting us at contact@colordesigntool.site.

Include your API key in the X-API-Key header with each request:

curl -H "X-API-Key: your_api_key_here" https://api.colordesigntool.site/v1/endpoint

Rate Limiting

The API is rate limited to 100 requests per minute per API key. If you exceed this limit, you'll receive a 429 Too Many Requests response.

Base URL

All API endpoints start with:

https://api.colordesigntool.site/v1/

Endpoints

Color Palette Generator

Generate color palettes based on various schemes.

Endpoint: GET /palette

Parameters:

  • base_color (required): HEX color code (e.g., #3b82f6)
  • scheme: Color scheme type (analogous, monochromatic, triadic, complementary, split_complementary, square). Default: analogous
  • count: Number of colors to generate (3-10). Default: 5

Example Request:

GET https://api.colordesigntool.site/v1/palette?base_color=3b82f6&scheme=triadic&count=5

Example Response:

{
  "success": true,
  "colors": [
    {"hex": "#3b82f6", "rgb": {"r": 59, "g": 130, "b": 246}},
    {"hex": "#f63b82", "rgb": {"r": 246, "g": 59, "b": 130}},
    {"hex": "#82f63b", "rgb": {"r": 130, "g": 246, "b": 59}},
    {"hex": "#f6a13b", "rgb": {"r": 246, "g": 161, "b": 59}},
    {"hex": "#3bf6a1", "rgb": {"r": 59, "g": 246, "b": 161}}
  ],
  "scheme": "triadic"
}

Color Contrast Checker

Check the contrast ratio between two colors for accessibility.

Endpoint: GET /contrast

Parameters:

  • foreground (required): HEX color code of text
  • background (required): HEX color code of background

Example Request:

GET https://api.colordesigntool.site/v1/contrast?foreground=000000&background=ffffff

Example Response:

{
  "success": true,
  "foreground": "#000000",
  "background": "#ffffff",
  "contrast_ratio": 21.0,
  "wcag_aa": "pass",
  "wcag_aaa": "pass",
  "wcag_aa_large_text": "pass",
  "wcag_aaa_large_text": "pass"
}

Color Converter

Convert between color formats (HEX, RGB, HSL, CMYK).

Endpoint: GET /convert

Parameters:

  • color (required): Color value in any supported format
  • format: Desired output format (hex, rgb, hsl, cmyk). Default: all formats

Example Request:

GET https://api.colordesigntool.site/v1/convert?color=3b82f6&format=hsl

Example Response:

{
  "success": true,
  "input": "#3b82f6",
  "hsl": "hsl(217, 92%, 60%)"
}

Error Responses

The API returns standard HTTP status codes along with JSON error messages:

  • 400 Bad Request: Invalid parameters
  • 401 Unauthorized: Missing or invalid API key
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Error responses include a message explaining the issue:

{
  "success": false,
  "error": "Invalid API key",
  "code": 401
}

Terms of Use

By using the colordesigntool.site API, you agree to the following terms:

  • The API is provided for personal and commercial use
  • Don't abuse the API (respect rate limits)
  • Attribute colordesigntool.site when appropriate
  • We may revoke API access at any time for violations

Support

For API support or to request higher rate limits, please contact us at contact@colordesigntool.site.

Advertisement