

Color Tools API
RoarAPI tarafından · temel yol /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.
Uç noktalar yükleniyor…Belgeler
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
| Format | Description |
|---|---|
| HEX | Standard hexadecimal colors |
| RGB | Red, Green, Blue |
| HSL | Hue, Saturation, Lightness |
| HSV | Hue, 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
| Name | Type | Required | Description |
|---|---|---|---|
| foreground | string | Yes | Text (foreground) color |
| background | string | Yes | Background color |
Convert Color
GET
/convert
Convert a color into every supported format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| color | string | Yes | Color in HEX, RGB, HSL, HSV, or RGB values |
Generate Color Palette
GET
/palette
Generate harmonious color palettes based on a base color.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| color | string | Yes | Base color |
| scheme | string | No | Harmony 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
Uç Noktalar
4color-tools — Gateway API tarafından sunulan tüm uç noktalar ve her birinin ne yaptığı.
- 1GET
/color-tools-api/contrastWCAG 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/convertConvert 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/paletteGenerate 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/randomA random color in every format
Return a random RGB color rendered in every supported format.
Fiyatlandırma
| Plan | Fiyatlandırma | Hız sınırları | Kotalar | Tüm 3 planı karşılaştır |
|---|---|---|---|---|
| Basic | Ücretsiz | 5 istek / saniye | 10 istek / ay | |
| Pro | $5/ay | 20 istek / saniye | 100000 istek / ay | |
| Max | $9,99/ay | 50 istek / saniye | 1000000 istek / ay |