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
}'{
"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": "#EEEEEE", "percentage": 72.7 },
{ "hex": "#334488", "percentage": 27.3 }
],
"palette": [
{
"hex": "#EEEEEE",
"rgb": [238, 238, 238],
"percentage": 72.7,
"confidence": 0.42,
"sources": ["matched_css_selector"]
}
],
"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 Primary production endpoint. Accepts a JSON body with URL and analysis options.
GET /v1/palette Query-parameter variant for quick tests and simple examples.
POST /v1/analyze Alias for POST /v1/palette. Keep /v1/palette as the main documented endpoint.
GET /openapi.yaml Returns the OpenAPI 3.1 specification.
GET /healthz Returns basic service health: {"status":"ok","service":"givemecolors-api"}.
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
}| Field | 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 | 32 | Maximum linked visual assets to fetch and analyze. Use 0 for faster CSS-focused analysis. |
Use stricter, faster settings for homepage demos and public previews.
{
"colors": 6,
"ignore_neutrals": false,
"timeout_seconds": 5,
"max_css_files": 4,
"max_assets": 0
}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": "#EEEEEE", "percentage": 72.7 },
{ "hex": "#334488", "percentage": 27.3 }
],
"palette": [
{
"hex": "#EEEEEE",
"rgb": [238, 238, 238],
"percentage": 72.7,
"confidence": 0.42,
"sources": ["matched_css_selector"]
}
],
"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: 6,
ignore_neutrals: false,
timeout_seconds: 5,
max_css_files: 4,
max_assets: 0
};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.