Маркетплейс
OpenAPI
color-tools    — Gateway API

Color Tools API

Tools

от RoarAPI · базовый путь /color-tools-api

Everything developers and designers need for working with colors in one powerful API. Convert colors between popular formats, generate harmonious color palettes, validate WCAG accessibility contrast, and create random colors using a fast REST API.

101
Подписчики
5.0 (1)
Рейтинг
100.00%
Аптайм
878 мс
Задержка p95
Загрузка эндпоинтов…

Документация

Color Tools API

is a comprehensive REST API designed for developers, designers, UI/UX professionals, and design systems that need reliable color processing.

Instead of implementing complex color conversion algorithms or maintaining multiple color libraries, developers can use a single API to convert colors, generate professional color palettes, check accessibility compliance, and generate random colors.

The API supports all common color formats including HEX, RGB, HSL, and HSV, making it ideal for web applications, mobile apps, graphic design tools, CMS platforms, branding software, theme builders, dashboards, AI applications, and creative workflows.

Whether you're building a design system, a website builder, an image editor, a brand identity tool, or an accessibility checker, Color Tools API provides fast, accurate, and production-ready color utilities.


Features

  • Convert between HEX, RGB, HSL, and HSV
  • WCAG 2.1 contrast ratio calculation
  • AA and AAA accessibility validation
  • Generate harmonious color palettes
  • Multiple harmony schemes
  • Random color generation
  • REST API
  • API Key authentication
  • Lightweight responses
  • High performance
  • Production-ready
  • Stateless architecture
  • Easy integration

Supported Color Formats

FormatDescription
HEXStandard hexadecimal colors
RGBRed, Green, Blue
HSLHue, Saturation, Lightness
HSVHue, Saturation, Value

API Endpoints

Check Color Contrast

GET

/contrast

Calculate the WCAG 2.1 contrast ratio between foreground and background colors and determine whether they pass AA and AAA accessibility requirements.

Parameters
NameTypeRequiredDescription
foregroundstringYesText (foreground) color
backgroundstringYesBackground color

Convert Color

GET

/convert

Convert a color into every supported format.

Parameters
NameTypeRequiredDescription
colorstringYesColor in HEX, RGB, HSL, HSV, or RGB values

Generate Color Palette

GET

/palette

Generate harmonious color palettes based on a base color.

Parameters
NameTypeRequiredDescription
colorstringYesBase color
schemestringNoHarmony scheme

Supported schemes may include:

  • Analogous
  • Complementary
  • Triadic
  • Split Complementary
  • Tetradic
  • Monochromatic

Generate Random Color

GET

/random

Generate a random color returned in every supported format.


Parameters

foreground

Foreground (text) color.

Example

#333333

background

Background color.

Example

#FFFFFF

color

Accepted formats

#3366CC
rgb(51,102,204)
hsl(220,60%,50%)
51,102,204

scheme

Palette generation style.

Example

triadic

Example Requests

Convert a color

GET /convert?color=#3366CC

Generate a palette

GET /palette?color=#3366CC&scheme=triadic

Check accessibility contrast

GET /contrast?foreground=#333333&background=#FFFFFF

Generate a random color

GET /random

Example Responses

Convert

{
  "hex": "#3366CC",
  "rgb": "rgb(51,102,204)",
  "hsl": "hsl(220,60%,50%)",
  "hsv": "hsv(220,75%,80%)"
}

Contrast

{
  "ratio": 12.63,
  "AA": true,
  "AAA": true
}

Palette

{
  "scheme": "triadic",
  "colors": [
    "#3366CC",
    "#CC3366",
    "#66CC33"
  ]
}

Random

{
  "hex": "#2FD18A",
  "rgb": "rgb(47,209,138)",
  "hsl": "hsl(154,64%,50%)",
  "hsv": "hsv(154,78%,82%)"
}

Common Use Cases

Perfect for:

  • UI Design Systems
  • Design Tokens
  • Website Builders
  • Theme Generators
  • Mobile Apps
  • Graphic Design Software
  • Branding Platforms
  • Accessibility Testing
  • WCAG Validation
  • CSS Tools
  • Dashboard Builders
  • AI Design Applications
  • Color Pickers
  • Image Editors
  • CMS Platforms
  • Figma Plugins
  • Creative Automation
  • Frontend Development

Performance

  • Fast color conversion
  • Accurate mathematical calculations
  • Stateless architecture
  • High throughput
  • Cloud-native
  • Horizontally scalable
  • Production-ready

Best Practices

  • Use HEX for CSS and web development.
  • Validate text/background combinations with the contrast endpoint before publishing.
  • Generate harmonious palettes for consistent UI themes.
  • Use random colors for testing, placeholders, or creative inspiration.
  • Verify AA or AAA compliance for accessibility-focused applications.

SDK Compatibility

Compatible with every HTTP client including:

  • JavaScript
  • TypeScript
  • Python
  • Go
  • Java
  • C#
  • PHP
  • Ruby
  • Rust
  • Swift
  • Kotlin
  • Dart
  • cURL

Эндпоинты

4

Все эндпоинты, которые предоставляет color-tools — Gateway API, и что делает каждый из них.

  • 1GET/color-tools-api/contrast

    WCAG contrast ratio between two colors

    Compute the WCAG 2.1 contrast ratio and whether it passes AA/AAA for normal/large text.

  • 2GET/color-tools-api/convert

    Convert a color between hex, RGB, HSL, and HSV

    Parse a color in any common notation and return it in every supported format.

  • 3GET/color-tools-api/palette

    Generate a harmonious palette from a base color

    Return the base color and its scheme partners (hue-rotated on the HSL wheel).

  • 4GET/color-tools-api/random

    A random color in every format

    Return a random RGB color rendered in every supported format.

Тарифы

ТарифТарифыСравнить все планы (3)
Basic
Бесплатно
Pro
5 $/мес.
Max
9,99 $/мес.
Color Tools API · RoutexAPI