# Website Color Palette Extractor - Brand Colors from CSS (`propped_cloak/website-color-palette`) Actor

Extract the color palette and brand color of any website from its CSS: most used colors, neutrals, CSS color variables and theme color, in bulk. No browser. $2 per 1,000 sites.

- **URL**: https://apify.com/propped_cloak/website-color-palette.md
- **Developed by:** [Emmanuel Vingadassalon](https://apify.com/propped_cloak) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 website analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website Color Palette Extractor - Brand Colors from CSS

Get the **brand color and color palette of hundreds of websites** in one run, from their CSS: the most used colors with their share, the neutrals (white, black, grays) kept apart, the CSS color variables (`--primary`, `--brand`...) and the `theme-color`.

- **A primary color guess you can trust or check.** The brand color comes from the site's own CSS variables named brand or primary (then accent-like names), else from its `theme-color`, else from the most used color. Hover and shadow variants, state colors (error, warning, success), backgrounds and pale tints are never picked. Measured on 37 well-known brands, the guess matches the real brand color 7 times out of 10. `primaryColorSource` tells you where it comes from.
- **The full palette.** Up to 12 brand colors sorted by how often the CSS uses them, plus the top neutrals, so you can pick the right shade yourself.
- **Design tokens.** Up to 20 CSS color variables with their values.
- **Fast and cheap.** The page and up to 6 stylesheets are read, no browser: **$2 per 1,000 sites**, where browser-based palette Actors charge up to $40.

### What can I use it for?

- **Design and branding research:** compare the colors of a market or of competitors.
- **Personalized outreach and mockups:** generate a pitch, a demo or a preview in each prospect's brand color.
- **Directories and dashboards:** give each company card its brand color automatically.
- **Accessibility and consistency audits:** spot sites that use dozens of near-identical colors (`distinctColors`).

### Input

```json
{ "urls": ["spotify.com", "apify.com", "github.com"] }
```

### Output

One row per website. Example from a real run (lists shortened):

```json
{
    "url": "https://spotify.com/",
    "finalUrl": "https://open.spotify.com/",
    "status": 200,
    "primaryColor": "#1ed760",
    "primaryColorSource": "css variable --essential-bright-accent",
    "palette": [
        { "hex": "#1ed760", "count": 41, "share": 3.8 },
        { "hex": "#590810", "count": 20, "share": 1.9 }
    ],
    "neutrals": [
        { "hex": "#ffffff", "count": 286, "share": 26.7 },
        { "hex": "#000000", "count": 239, "share": 22.3 }
    ],
    "cssColorVariables": [
        { "name": "--background-highlight", "hex": "#000000" },
        { "name": "--text-bright-accent", "hex": "#ffffff" }
    ],
    "distinctColors": 120,
    "themeColor": null,
    "stylesheetsRead": 1,
    "error": null
}
```

`share` is the percentage of all color occurrences in the CSS. A color defined once but used everywhere through a variable is counted once: check `cssColorVariables` for design tokens.

### Pricing

**$0.002 per website analyzed ($2 per 1,000 sites)** plus Apify's small run-start fee. No subscription, lower prices on higher Apify plans. Invalid inputs, errors and pages without any CSS color are free.

### How it works, and its limits

Colors are read from the CSS (inline styles, `<style>` blocks and linked stylesheets), not from a rendered screenshot. Colors that only appear in images, or in styles injected later by JavaScript, are not counted. The primary color is a best guess: always look at `primaryColorSource` and the palette.

### Use it from AI agents (MCP)

Add `website-color-palette` to the [Apify MCP server](https://mcp.apify.com) in your MCP client (Claude, Cursor, VS Code...).

### Integrations

Apify API, schedules, webhooks, Make, Zapier, n8n. Export as JSON, CSV, Excel or HTML.

### FAQ

**Need the logo too?** Use [Website Logo & Favicon Extractor](https://apify.com/propped_cloak/website-logo-extractor).

**Something wrong or missing?** Open an issue on the Issues tab.

# Actor input Schema

## `urls` (type: `array`):

Domains or URLs, one per line. The page and up to 6 of its stylesheets are read, with no browser. Duplicates are removed.

## Actor input object example

```json
{
  "urls": [
    "spotify.com",
    "apify.com",
    "github.com"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

One row per website: primary color guess and its source, top colors with usage share, neutrals, CSS color variables and theme color.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "spotify.com",
        "apify.com",
        "github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("propped_cloak/website-color-palette").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "spotify.com",
        "apify.com",
        "github.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("propped_cloak/website-color-palette").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "spotify.com",
    "apify.com",
    "github.com"
  ]
}' |
apify call propped_cloak/website-color-palette --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,propped_cloak/website-color-palette"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iv9WwETaBne5wmEEt/builds/1LosiIWqFRF6V7IJH/openapi.json
