Finance & Conversion
Color Convert API
Convert a color between hex, RGB, and HSL, with the CSS color name when one matches.
Request Headers
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | color-convert.p.rapidapi.com |
Endpoints
GET
/v1/convert/color Convert a color between hex, RGB, and HSL representations
Parameters
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
to | string | optional | — | — |
value | string | required | — | matches \S |
Code Examples
curl --request GET \
--url 'https://color-convert.p.rapidapi.com/v1/convert/color?value=example' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: color-convert.p.rapidapi.com' const url = "https://color-convert.p.rapidapi.com/v1/convert/color?value=example";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "color-convert.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://color-convert.p.rapidapi.com/v1/convert/color"
querystring = {"value": "example"}
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "color-convert.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json()) Interactive Example
$ GET /v1/convert/color?value=%23ff0000
{"input":"#ff0000","hex":"#ff0000","rgb":{"r":255,"g":0,"b":0},"hsl":{"h":0,"s":100,"l":50},"name":"red"} Subscribe & License
Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.
Developer Support
Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.
System Performance
Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.
All Systems Operational