← All tool references

Image Tools · execute

Color Palette Generator

Create a coordinated set of hex colors and copy-ready CSS variables from one starting color.

Open public tool

Overview

Category
Image Tools
API mode
execute
Processing
hybrid
Privacy
ephemeral-upload

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/color-palette-generator

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/color-palette-generator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

base_color · string · required
Enter a six-digit hex color, such as #2F6FED, to anchor the palette.
count · number · required
Enter how many swatches, rolls, picks, names, letters, or values you want returned.
mode · string · required
Choose which calculation or conversion direction you need. Accepted values: analogous, complementary, triadic, monochrome.
{
    "type": "object",
    "properties": {
        "base_color": {
            "type": "string",
            "description": "Enter a six-digit hex color, such as #2F6FED, to anchor the palette."
        },
        "count": {
            "type": "number",
            "description": "Enter how many swatches, rolls, picks, names, letters, or values you want returned."
        },
        "mode": {
            "type": "string",
            "enum": [
                "analogous",
                "complementary",
                "triadic",
                "monochrome"
            ],
            "description": "Choose which calculation or conversion direction you need."
        }
    },
    "required": [
        "base_color",
        "count",
        "mode"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

palette · array
Generated hex colors.
css · string
Ready-to-paste CSS custom properties.
{
    "type": "object",
    "properties": {
        "palette": {
            "type": "array",
            "items": [],
            "description": "Generated hex colors."
        },
        "css": {
            "type": "string",
            "description": "Ready-to-paste CSS custom properties."
        }
    },
    "additionalProperties": false
}

Color Palette Generator: Analogous palette

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/color-palette-generator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "base_color": "#2F6FED",
    "count": 5,
    "mode": "analogous"
}'
{
    "ok": true,
    "data": {
        "slug": "color-palette-generator",
        "result": {
            "values": {
                "palette": [
                    "#2F6FED",
                    "#2F9AED",
                    "#2FEDD6",
                    "#2FED6F",
                    "#6FED2F"
                ],
                "css": "--c1:#2F6FED;"
            },
            "display": {
                "display": "[\"#2F6FED\",\"#2F9AED\",\"#2FEDD6\",\"#2FED6F\",\"#6FED2F\"]"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.