Color Identifier API
Color identifier API for extracting accurate color data from any image Upload an image to detect colors, generate palettes, and get precise HEX, RGB, HSL, and CMYK codes in a single API call.
Color identifier API for extracting accurate color data from any image Upload an image to detect colors, generate palettes, and get precise HEX, RGB, HSL, and CMYK codes in a single API call.
The Color Identifier API processes any image input to detect dominant colors and output structured data for each identified tone. Responses include standardized HEX, RGB, HSL, and CMYK values, along with multilingual color names, luminance scores, YIQ encoding, and recommended contrast text colors. This granular data allows consistent color classification across design systems, product catalogs, and content repositories.
Integration is available via direct REST endpoints or RapidAPI distribution, with no additional infrastructure required. Developers can access language-specific code snippets in Python, JavaScript, Go, and other runtimes to speed implementation. The API supports use cases including automated tagging, dynamic theming, search filtering by color, and metadata enrichment pipelines.
Our Color Identifier API integrates with RapidAPI, making it easy to connect and start using in your preferred development environment. Through RapidAPI, you can access ready-made code snippets for Python, JavaScript, Go, PHP, and other languages. The API accepts an image input and returns structured color data, including HEX, RGB, HSL, and CMYK representations, multilingual color names, and recommended text contrast. This enables fast integration into design tools, content workflows, or batch processing pipelines. Refer to the documentation for instructions on authentication, request formatting, and response handling.
import http.client
conn = http.client.HTTPSConnection("color-identifier.p.rapidapi.com")
headers = {
'x-rapidapi-key': "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
'x-rapidapi-host': "color-identifier.p.rapidapi.com"
}
conn.request("GET", "/color-identifier-api.php?image=https://slash1.coloridentifier.org/wp-content/uploads/color-identifier-tool-colorful-mushrooms.jpg&count=3&format=hex%2C%20rgb&lang=en&pretty=true&x=0&y=0&w=300&h=200", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require('https');
const options = {
method: 'GET',
hostname: 'color-identifier.p.rapidapi.com',
port: null,
path: '/color-identifier-api.php?image=https%3A%2F%2Fslash1.coloridentifier.org%2Fwp-content%2Fuploads%2Fcolor-identifier-tool-colorful-mushrooms.jpg&count=3&format=hex%2C%20rgb&lang=en&pretty=true&x=0&y=0&w=300&h=200',
headers: {
'x-rapidapi-key': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'x-rapidapi-host': 'color-identifier.p.rapidapi.com'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', 'https://color-identifier.p.rapidapi.com/color-identifier-api.php?image=https%3A%2F%2Fslash1.coloridentifier.org%2Fwp-content%2Fuploads%2Fcolor-identifier-tool-colorful-mushrooms.jpg&count=3&format=hex%2C%20rgb&lang=en&pretty=true&x=0&y=0&w=300&h=200');
xhr.setRequestHeader('x-rapidapi-key', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
xhr.setRequestHeader('x-rapidapi-host', 'color-identifier.p.rapidapi.com');
xhr.send(data);
"https://color-identifier.p.rapidapi.com/color-identifier-api.php?image=https%3A%2F%2Fslash1.coloridentifier.org%2Fwp-content%2Fuploads%2Fcolor-identifier-tool-colorful-mushrooms.jpg&count=3&format=hex%2C%20rgb&lang=en&pretty=true&x=0&y=0&w=300&h=200",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-host: color-identifier.p.rapidapi.com",
"x-rapidapi-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl -X GET "https://color-identifier.p.rapidapi.com/color-identifier-api.php?image=https%3A%2F%2Fslash1.coloridentifier.org%2Fwp-content%2Fuploads%2Fcolor-identifier-tool-colorful-mushrooms.jpg&count=3&format=hex%2C%20rgb&lang=en&pretty=true&x=0&y=0&w=300&h=200" \ -H "x-rapidapi-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ -H "x-rapidapi-host: color-identifier.p.rapidapi.com"
import http.client
conn = http.client.HTTPSConnection("color-identifier.p.rapidapi.com")
headers = {
'x-rapidapi-key': "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
'x-rapidapi-host': "color-identifier.p.rapidapi.com"
}
conn.request("GET", "/color-identifier-api.php?image=https://slash1.coloridentifier.org/wp-content/uploads/color-identifier-tool-colorful-mushrooms.jpg&count=3&format=hex%2C%20rgb&lang=en&pretty=true&x=0&y=0&w=300&h=200", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))