API Documentation

Integrate our color tools into your applications

API Overview

Our API allows you to programmatically access all the color tools available on our platform. You can generate color palettes, convert between color formats, check contrast ratios, and more.

Base URL

https://api.gmeii.site/v1

Authentication

API Key Required

Format

JSON Responses

API Access

Basic API access is included with our Pro plan. Advanced API features require a Team plan. View pricing plans.

Authentication

All API requests require an API key sent in the Authorization header.

Example Request

curl -X GET \
  https://api.gmeii.site/v1/palette \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json'

You can find your API key in your account settings after subscribing to a paid plan.

API Endpoints

Generate Color Palette

Generate a color palette based on a base color and harmony rule.

Request

POST /palette
{
  "base_color": "#3B82F6",
  "mode": "analogous",
  "count": 5
}

Response

{
  "status": "success",
  "colors": [
    {"hex": "#3B82F6", "rgb": {"r": 59, "g": 130, "b": 246}},
    {"hex": "#3BF6E5", "rgb": {"r": 59, "g": 246, "b": 229}},
    {"hex": "#3BF665", "rgb": {"r": 59, "g": 246, "b": 101}},
    {"hex": "#F6BA3B", "rgb": {"r": 246, "g": 186, "b": 59}},
    {"hex": "#F63B82", "rgb": {"r": 246, "g": 59, "b": 130}}
  ]
}

Convert Color Format

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

Request

POST /convert
{
  "color": "#3B82F6",
  "from": "hex",
  "to": ["rgb", "hsl", "cmyk"]
}

Response

{
  "status": "success",
  "original": {"hex": "#3B82F6"},
  "converted": {
    "rgb": "rgb(59, 130, 246)",
    "hsl": "hsl(217, 92%, 60%)",
    "cmyk": "cmyk(76, 47, 0, 4)"
  }
}

Check Color Contrast

Check the contrast ratio between two colors and WCAG compliance.

Request

POST /contrast
{
  "foreground": "#000000",
  "background": "#FFFFFF",
  "font_size": "normal"
}

Response

{
  "status": "success",
  "contrast_ratio": 21.0,
  "wcag": {
    "aa": true,
    "aaa": true
  },
  "suggestions": "This combination provides excellent contrast."
}

Rate Limiting

API requests are rate limited to ensure fair usage:

Plan Requests/Minute Requests/Day
Free 10 500
Pro 60 10,000
Team 120 50,000

If you exceed these limits, you'll receive a 429 Too Many Requests response. Contact us if you need higher limits for your application.

SDKs and Libraries

We provide official client libraries for popular programming languages:

JavaScript/Node.js

npm install color-tools-sdk Documentation →

Python

pip install color-tools Documentation →

PHP

composer require color-tools/api Documentation →