# Ai Color Palette Generator (`calm_necessity/ai-color-palette-generator`) Actor

Generate professional color palettes using AI from text descriptions. This Actor creates structured color suggestions with hex codes, names, categories, and similarity scores, making it ideal for branding, UI/UX design, web development, and automated design workflows.

- **URL**: https://apify.com/calm\_necessity/ai-color-palette-generator.md
- **Developed by:** [Taher Ali Badnawarwala](https://apify.com/calm_necessity) (community)
- **Categories:** AI, Developer tools, Other
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<header>

## AI Color Palette Generator

<p><strong>Text-to-palette API</strong> that turns a short description into a ready-to-use color palette. Send one query and get back hex codes, color names, and metadata. Designed for designers, developers, and teams who want fast, automated color palette generation without design tools.</p>

<blockquote>
  <strong>What it does:</strong> Send a text query (for example <em>"ecommerce website templates design"</em> or <em>"vibrant sunset colors for a travel blog"</em>) and receive a generated color palette with hex codes and names in seconds.
</blockquote>

</header>

***

### TL;DR

- **Input:** One text query
- **Output:** Color palette (hex codes, names) + metadata
- **Use it for:** Branding, UI/UX, marketing, automation
- **Result time:** Usually under 20 seconds

***

### Table of contents

- [Try it now](#try-it-now)
- [Overview](#overview)
- [Usage examples](#usage-examples)
- [Features](#features)
- [Configuration](#configuration)
- [Usage](#usage)
- [Output](#output)
- [For bloggers & tutorial writers](#for-bloggers--tutorial-writers)
- [Grow your user base](#grow-your-user-base)
- [Integration](#integration)
- [Technical details](#technical-details)
- [FAQ](#faq)
- [Resources](#resources)

***

### Try it now

| Action | Link |
|------|------|
| **Run in Apify Console** | Open Actor → Start |
| **API (sync)** | `POST https://api.apify.com/v2/acts/YOUR_USERNAME~ai-color-palette-generator/run-sync` |

<em>Replace <code>YOUR\_USERNAME</code> with your Apify username.</em>

***

### Overview

The **AI Color Palette Generator** creates color palettes from plain text using the MultipleWords color suggestion API. You describe the theme or style you want, and the Actor returns a curated palette with hex codes, color names, and metadata.

This Actor is useful when you need palettes on demand, at scale, or as part of an automated workflow.

#### Common use cases

| Category | Examples |
|-------|---------|
| Design & branding | Brand palettes, marketing materials, cohesive themes |
| Web development | UI/UX palettes, theme colors, e-commerce sites |
| Content creation | Graphic design, social media, presentations |
| Automation | Workflows, batch generation, API integration |

> **Note:** Usage rights depend on the upstream API and your Apify plan. Review terms before commercial use.

***

### Usage examples

Paste these into the **Query** field or API input.

| Scenario | Query |
|-------|--------|
| E-commerce | `ecommerce website templates design` |
| Modern UI | `modern minimalist website with warm colors` |
| Travel blog | `vibrant sunset colors for a travel blog` |
| Corporate | `professional corporate blue and gray palette` |
| Cafe / cozy | `warm autumn colors for a cafe branding` |

***

### Features

- Text-to-palette generation from a single query
- Clean JSON output for easy integration
- Works in bulk via API
- Input validation and retries with exponential backoff
- Runs fully on Apify (Console, API, automation tools)
- Output schema for organized display in Apify Console

***

### Configuration

All settings are provided via the Actor input.

#### Input parameters

| Parameter | Type | Required | Default | Description |
|--------|------|----------|--------|------------|
| `query` | string | Yes | — | Text description of the color palette theme |
| `nOutputs` | integer | No | `10` | Number of color suggestions (1–10) |

#### Query tips

- Include context (e.g. "website", "mobile app", "branding")
- Mention mood or style (e.g. "modern", "vintage", "minimalist")
- Describe use case (e.g. "ecommerce", "portfolio", "corporate")

#### Example input

```json
{
  "query": "modern minimalist website design with warm colors",
  "nOutputs": 10
}
```

***

### Usage

#### Apify Console

1. Open the Actor in Apify Console.
2. Enter a query in the **Query** field (or use the default).
3. Optionally set **Number of Colors** (1–10).
4. Click **Start** and check the **Output** tab for the color palette and metadata.

#### API (run-sync)

Replace `YOUR_USERNAME` with your Apify username and `YOUR_API_TOKEN` with your [Apify API token](https://console.apify.com/account/integrations).

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~ai-color-palette-generator/run-sync?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "vibrant sunset colors for a travel blog", "nOutputs": 10}'
```

Response includes `runId`, `status`, and dataset items with `query`, `colors`, and `resultsCount`.

***

### Output

Each run writes one or more items to the default dataset. The **Output** tab uses the [output schema](.actor/output_schema.json) to show results in organized tables.

| Field | Description |
|-------|-------------|
| `query` | The text query used for color suggestions |
| `colors` | Array of colors: `{ hex, name }` |
| `resultsCount` | Number of color suggestions returned |
| `status` | Success indicator (1 = success) |

#### Example output (dataset item)

```json
{
  "status": 1,
  "query": "ecommerce website templates design",
  "colors": [
    { "hex": "#3B7A57", "name": "Amazon" },
    { "hex": "#78866B", "name": "CamouflageGreen" }
  ],
  "resultsCount": 10
}
```

In the Apify Console **Output** tab you can view **Color palettes** (overview) or **Full dataset** (all fields).

***

### For bloggers & tutorial writers

You can use this Actor in tutorials, blog posts, or videos without running it first:

- **Input:** Use the [Example input](#example-input) or [Usage examples](#usage-examples) table.
- **Output:** Use the [Example output](#example-output-dataset-item) above to show what users get.
- **API:** Use the [API (run-sync)](#api-run-sync) curl example; remind readers to replace `YOUR_USERNAME` and `YOUR_API_TOKEN`.

For promotion ideas, copy-paste posts, and where to share, see [PROMOTION.md](PROMOTION.md) in this repo.

***

### Grow your user base

Promote your Actor to reach more users: share it in relevant communities, forums, and social media where your target audience is active (design, dev, no-code). Consider blog posts, tutorials, or videos that demonstrate use cases.

- **[PROMOTION.md](PROMOTION.md)** — Copy-paste posts, where to promote (Apify Discord, Reddit, Twitter/X, LinkedIn, Hacker News), and a 5-action checklist for this week.
- **Store visibility** — Your [`.actor/actor.json`](.actor/actor.json) controls how the Actor appears in the Apify Store: `title`, `description`, and `readme` affect search and conversions. See the [actor.json reference](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) for the full definition.

***

### Integration

- **Make (Integromat)** — Use the Apify module and select this Actor; map your query to the **Query** input.
- **Zapier** — Use the Apify Zapier app and choose "Run Actor"; select this Actor and pass the query.
- **Custom apps** — Call the Apify API (`/run` or `/run-sync`) with the same input JSON.

***

### Technical details

- **Runtime:** Node.js (see [Dockerfile](Dockerfile)).
- **Input:** Validated against the input schema; invalid input returns a clear error.
- **External API:** Uses MultipleWords color suggestion API; failures are retried with exponential backoff.
- **Output schema:** Defined in [.actor/output\_schema.json](.actor/output_schema.json) for organized display in Console.

***

### FAQ

**How long does a run take?**\
Usually under 20 seconds for a single query.

**Can I run multiple queries in one go?**\
You can run the Actor multiple times (e.g. from a workflow). Each run processes one query; for bulk, use the API or automation tools.

**What is the maximum number of colors per palette?**\
Up to 10 colors per run. Use the `nOutputs` input (1–10).

**Do I need an API key for the color API?**\
The Actor uses its own integration; you only need your Apify account and (for API calls) your Apify API token.

***

### Resources

- [Apify Console](https://console.apify.com) — Run the Actor and view datasets
- [Apify API](https://docs.apify.com/api/v2) — Run actors programmatically
- [Actor definition (actor.json)](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) — Store visibility: title, description, readme
- [Actor output schema](https://docs.apify.com/platform/actors/development/actor-definition/output-schema) — How output is displayed
- [PROMOTION.md](PROMOTION.md) — How to promote this Actor and grow your user base
- [CHANGELOG](.actor/CHANGELOG.md) — Version history

# Actor input Schema

## `query` (type: `string`):

Text query describing the color palette theme (e.g., 'ecommerce website templates design')

## `nOutputs` (type: `integer`):

Number of color suggestions to return (maximum 10)

## Actor input object example

```json
{
  "query": "ecommerce website templates design",
  "nOutputs": 10
}
```

# Actor output Schema

## `palettes` (type: `string`):

Dataset of generated color palettes with query, colors (hex + name), and count

## `dataset` (type: `string`):

Complete dataset (all fields) as JSON

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("calm_necessity/ai-color-palette-generator").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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call calm_necessity/ai-color-palette-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=calm_necessity/ai-color-palette-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5L8qxK3mApBLD0E5n/builds/piNwEjF5w4aO3n5Ly/openapi.json
