---
title: "Use this when you need color-harmony palettes derived from one base hex color."
method: POST
path: "/v1/color_palette"
tags: ["color"]
---

# Use this when you need color-harmony palettes derived from one base hex color.

`POST /v1/color_palette`

## Request

- Base URL: `https://api.clean.tools`
- URL: `https://api.clean.tools/v1/color_palette`
- Auth: none declared

Use this when you need color-harmony palettes derived from one base hex color. Rotates hue/lightness in HSL to build complementary (+180 degrees), analogous (-30/+30), triadic (+120/+240), split-complementary (+150/+210), and monochromatic (lightness steps) swatch sets, each as an array of hex strings. Accepts a 6-digit hex with or without a leading '#' (case-insensitive). Deterministic: same input, same output. Example: {color:'#e11d48'} -> base '#e11d48', complementary ['#e11d48','#1de1b6'], monochromatic ['#590c1d','#9d1432','#e11d48','#eb607e','#f3a4b5']. Note: grayscale inputs (e.g. '#000000') have no defined hue, so the hue-rotated sets are all identical and only the monochromatic lightness steps differ.

## Request body

- object
  - `color` string, required: A 6-digit hex color, with or without a leading '#', e.g. "#e11d48" or "e11d48". Case-insensitive.

## Response `200`

Structured tool result.

- object
  - `tool` string
  - `result` object
    - `base` string, required: Normalized base color as a 6-digit hex string (lowercased, with leading '#').
    - `complementary` string[], required: [base, hue+180] — 2 hex swatches.
    - `analogous` string[], required: [hue-30, base, hue+30] — 3 hex swatches.
    - `triadic` string[], required: [base, hue+120, hue+240] — 3 hex swatches.
    - `splitComplementary` string[], required: [base, hue+150, hue+210] — 3 hex swatches.
    - `monochromatic` string[], required: 5 hex shades stepping lightness by -30, -15, 0, +15, +30 from the base; the two darker steps are floored at lightness 5 and 10, and the two lighter steps capped at 90 and 95.

## Other responses

- `400`: Invalid input or the tool reported an error.
- `413`: Request body exceeds the 128 KB limit.
- `429`: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.

---

[API](https://skmtc.dev/clean/apis/clean-tools-api.md) · [All operations](https://skmtc.dev/clean/apis/clean-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clean/apis/clean-tools-api/revisions/a24a01d2833c?raw)
