RapidAPI consumer headers
X-RapidAPI-Key: your RapidAPI keyX-RapidAPI-Host: the exact host value shown by RapidAPIContent-Type:application/json
Website color palette API documentation
Give Me Colors analyzes static HTML, CSS, metadata, and optional visual assets to return structured hex colors, RGB values, percentages, confidence scores, and evidence sources.
Overview
Give Me Colors is an API for extracting useful brand and theme color palettes from public website URLs. It fetches static HTML, reads page metadata, analyzes inline styles and linked CSS, optionally samples favicons and OpenGraph images, and returns a structured palette for design tools, AI website builders, lead enrichment systems, brand analysis workflows, internal dashboards, and marketing tools.
https://YOUR_RAPIDAPI_HOSTPOST /v1/paletteQuick start
Subscribe on RapidAPI, copy your key and host value, then send a JSON request to POST /v1/palette.
curl -X POST "https://YOUR_RAPIDAPI_HOST/v1/palette" \
-H "Content-Type: application/json" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: YOUR_RAPIDAPI_HOST" \
-d '{
"input": "https://example.com",
"colors": 8,
"max_assets": 0
}'const response = await fetch("https://YOUR_RAPIDAPI_HOST/v1/palette", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "YOUR_RAPIDAPI_HOST"
},
body: JSON.stringify({
input: "https://example.com",
colors: 8,
ignore_neutrals: false,
timeout_seconds: 10,
max_css_files: 8,
max_assets: 0
})
});
const data = await response.json();
console.log(data);import requests
url = "https://YOUR_RAPIDAPI_HOST/v1/palette"
headers = {
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "YOUR_RAPIDAPI_HOST",
}
payload = {
"input": "https://example.com",
"colors": 8,
"ignore_neutrals": False,
"timeout_seconds": 10,
"max_css_files": 8,
"max_assets": 0,
}
response = requests.post(url, json=payload, headers=headers)
print(response.json()){
"source": {
"input": "https://example.com",
"kind": "website",
"final_url": "https://example.com/",
"title": "Example Domain",
"description": null,
"canonical_url": null,
"metadata": {
"theme_color": null,
"og_image": null,
"favicon": null
}
},
"palette_block": [
{ "hex": "#2563EB", "percentage": 41.2 },
{ "hex": "#FFFFFF", "percentage": 33.8 }
],
"palette": [
{
"hex": "#2563EB",
"rgb": [37, 99, 235],
"percentage": 41.2,
"confidence": 0.89,
"sources": ["css_variable", "linked_css_file"]
},
{
"hex": "#FFFFFF",
"rgb": [255, 255, 255],
"percentage": 33.8,
"confidence": 0.76,
"sources": ["inline_style", "linked_css_file"]
}
],
"warnings": [
{
"code": "NO_JS_RENDERING",
"message": "This analysis used static HTML/CSS/assets only. JavaScript-rendered styles may be missing."
}
]
}Authentication
Use the RapidAPI headers shown in your subscription dashboard. RapidAPI handles API keys, plan quotas, usage tracking, and billing for public access.
X-RapidAPI-Key: your RapidAPI keyX-RapidAPI-Host: the exact host value shown by RapidAPIContent-Type: application/jsonFor production apps, send Give Me Colors requests from your backend or serverless function. This keeps your RapidAPI key out of public browser bundles and lets you add caching, retries, and per-user controls.
Endpoints
POST /v1/palette PrimaryExtract a structured color palette from a public website URL using a JSON request body. Use this route for production integrations.
GET /v1/palette OptionalPerforms the same analysis using query parameters. Useful for quick testing and simple integrations.
curl "https://YOUR_RAPIDAPI_HOST/v1/palette?input=https%3A%2F%2Fexample.com&colors=8&max_assets=0" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: YOUR_RAPIDAPI_HOST"Request body
{
"input": "https://example.com",
"colors": 8,
"ignore_neutrals": false,
"timeout_seconds": 10,
"max_css_files": 8,
"max_assets": 5
}input #inputWebsite URL to analyze. Localhost, private IPs, and non-web URLs are rejected.
colors #colorsNumber of palette colors to return.
ignore_neutrals #ignore_neutralsReduces the influence of neutral colors like white, gray, and black.
timeout_seconds #timeout_secondsPer-request timeout for fetching the target website and related assets.
max_css_files #max_css_filesMaximum linked CSS files to fetch and analyze.
max_assets #max_assetsMaximum linked visual assets/images to fetch and analyze. Use 0 to skip image analysis.
| Name | Type | Required | Default | Min | Max | Description |
|---|---|---|---|---|---|---|
input | string | yes | none | n/a | n/a | Public http or https website URL to analyze. |
colors | integer | no | 8 | 1 | 32 | Number of palette colors to return. |
ignore_neutrals | boolean | no | false | n/a | n/a | Reduces neutral color influence when scoring the palette. |
timeout_seconds | integer | no | 10 | 1 | 30 | Per-request upstream fetch timeout. |
max_css_files | integer | no | 8 | 0 | 32 | Maximum linked CSS files to fetch and analyze. |
max_assets | integer | no | 5 | 0 | 8 | Maximum linked visual assets to fetch and analyze. Use 0 for faster CSS-focused analysis. |
Use balanced settings for homepage demos: enough CSS and asset coverage to improve brand accuracy without making most responses too slow.
{
"colors": 8,
"ignore_neutrals": false,
"timeout_seconds": 8,
"max_css_files": 6,
"max_assets": 2
}Use the API defaults for a richer brand palette that can include linked visual assets.
colors: 8timeout_seconds: 10max_css_files: 8max_assets: 5Response schema
{
"source": {
"input": "https://example.com",
"kind": "website",
"final_url": "https://example.com/",
"title": "Example Domain",
"description": null,
"canonical_url": null,
"metadata": {
"theme_color": null,
"og_image": null,
"favicon": null
}
},
"palette_block": [
{ "hex": "#2563EB", "percentage": 41.2 },
{ "hex": "#FFFFFF", "percentage": 33.8 }
],
"palette": [
{
"hex": "#2563EB",
"rgb": [37, 99, 235],
"percentage": 41.2,
"confidence": 0.89,
"sources": ["css_variable", "linked_css_file"]
},
{
"hex": "#FFFFFF",
"rgb": [255, 255, 255],
"percentage": 33.8,
"confidence": 0.76,
"sources": ["inline_style", "linked_css_file"]
}
],
"warnings": [
{
"code": "NO_JS_RENDERING",
"message": "This analysis used static HTML/CSS/assets only. JavaScript-rendered styles may be missing."
}
]
}| Field | Type | Description |
|---|---|---|
source | object | Information about the analyzed URL and page metadata. |
palette_block | array | Compact hex colors and percentages for visual rendering. |
palette | array | Detailed colors with hex, RGB, percentage, confidence, and evidence. |
warnings | array | Non-fatal analysis notes, such as missing JavaScript-rendered styles. |
| Field | Type | Description |
|---|---|---|
source.input | string | Original requested URL. |
source.kind | string | website or image. Public API input is URL-based. |
source.final_url | string or null | Final URL after validated redirects. |
source.title | string or null | HTML document title when available. |
source.description | string or null | Page description metadata when available. |
source.canonical_url | string or null | Canonical URL metadata when available. |
source.metadata.theme_color | string or null | Meta theme-color value when found. |
source.metadata.og_image | string or null | OpenGraph image URL when found. |
source.metadata.favicon | string or null | Favicon URL when found. |
| Field | Type | Description |
|---|---|---|
hex | string | Uppercase six-digit hex color, such as #2563EB. |
rgb | array | Three integers from 0 to 255. Included in detailed palette items. |
percentage | number | Estimated usage or importance percentage. |
confidence | number | Relative confidence score based on evidence strength. |
sources | array | Descriptive evidence labels explaining where the color was found. |
Possible sources values can include CSS variables, matched CSS selectors, inline
styles, metadata, SVG colors, raster image evidence, favicon evidence, logo image evidence,
or OpenGraph image evidence. Treat sources as descriptive labels, not a fixed enum.
Errors and rate limits
All error responses use {"error":{"code":"ERROR_CODE","message":"Human-readable message"}}.
| Status | Code | Meaning |
|---|---|---|
400 | INVALID_INPUT | URL or input is invalid, unsupported, blocked, or unsafe. |
400 | INVALID_OPTIONS | Request options are outside allowed ranges. |
401 | UNAUTHORIZED | RapidAPI credentials are missing or invalid. |
422 | NO_COLORS | The URL was valid, but no useful colors were found. |
422 | IMAGE_DECODE_FAILED | A direct image URL or asset could not be decoded. |
429 | RATE_LIMITED | Too many requests from the same client. Respect Retry-After. |
502 | FETCH_FAILED | The upstream website could not be fetched or returned a network error. |
Retry-After. Your effective quota depends on
the RapidAPI plan attached to your subscription.Security and public API limits
These limits reduce abuse risk, prevent SSRF, avoid port probing, and control bandwidth and cost.
Integration pattern
RapidAPI examples are easy to try with curl, but production web apps should usually make the request from server-side code. That protects your RapidAPI key and gives you a place to normalize URLs, cache repeated analysis, and enforce your own product limits.
Your app frontend
-> Your backend or serverless function
-> RapidAPI Give Me Colors endpoint
-> Public target websiteconst paletteRequest = {
input,
colors: 8,
ignore_neutrals: false,
timeout_seconds: 8,
max_css_files: 6,
max_assets: 2
};X-RapidAPI-Key and X-RapidAPI-Host from server-side code.Example use cases
Limitations
Give Me Colors v1 is optimized for fast, static brand color extraction from public URLs. It works best on websites that expose meaningful colors through HTML, metadata, CSS, favicons, logos, or OpenGraph images. It does not execute JavaScript, so results from heavily client-rendered websites may be partial.
FAQ
Give Me Colors extracts a structured color palette from a public website URL. It analyzes static HTML, metadata, CSS, and optional visual assets to identify useful brand and theme colors.
No. Give Me Colors v1 is a static analyzer. It does not run JavaScript or render pages in a browser, so heavily client-rendered websites may return partial results.
The API can analyze direct image URLs and linked website assets when they are publicly accessible and within configured limits. Website analysis can include favicons, logos, and OpenGraph images when max_assets is greater than 0.
palette_block is a compact list of hex colors and percentages intended for quick UI rendering, previews, and swatch blocks.
confidence is a relative score based on evidence strength. Colors found in stronger brand-like signals generally receive higher confidence.
For production apps, call RapidAPI from your backend or serverless function so your RapidAPI key is not shipped in public client code.