---
title: "Palette Extract"
method: POST
path: "/palette/extract"
---

# Palette Extract

`POST /palette/extract`

## Request

- Base URL: `https://api.colourmemory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.colourmemory.com/palette/extract`
- Auth: none declared

Extract dominant colours from an image using the same k-means++ algorithm
as the Colour Memory app. Accepts a public image URL or base64-encoded image.
Returns hex values with proportional weights sorted by luminance.
Optionally applies grey card white balance correction before extraction.
Optionally runs palette/analyse on the results if analyse=True.

## Headers

- `x-api-key` string, nullable

## Request body

- PaletteExtractRequest
  - `image_id` string, nullable
  - `image_url` string, nullable
  - `image_base64` string, nullable
  - `k` integer
  - `grey_card_hex` string, nullable
  - `analyse` boolean
  - `style_context` string, nullable
  - `archive` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/colourmemory/apis/colour-memory-api.md) · [All operations](https://skmtc.dev/colourmemory/apis/colour-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/colourmemory/apis/colour-memory-api/revisions/4ba028f64042?raw)
