---
title: "Dominant colours of a photo"
method: POST
path: "/images/palette"
---

# Dominant colours of a photo

`POST /images/palette`

## Request

- Base URL: `https://rendry.io/api/v1`
- URL: `https://rendry.io/api/v1/images/palette`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Six dominant colours plus a role suggestion (background / support / accent) — use it to theme a layout around an image.

## Headers

- `X-Rendry-Account` string

## Request body

- object
  - `url` string
  - `storage_key` string

## Response `200`

Palette

- PhotoPalette: Dominant colours of a photo and the roles suggested for a layout around it.
  - `colors` object[]
    - `hex` string
    - `share` number: Fraction of the measured pixels
  - `suggestion` object
    - `background` string
    - `support` string
    - `accent` string
  - `measured_over` string: What was measured: the whole photo, or the frame passed
  - `roles` object: bg, support, accent, on and the ranked colours 0..5 — the names a derived colour is addressed by
  - `hint` string

## Other responses

- `400`: `unknown_field`, `invalid_input`, `url_rejected` (the url is not a public http(s) address that resolves), `download_failed` (with `upstream_status` when the address answered), `file_too_large`. A storage_key outside this account is 404 `not_found`.
- `401`: Missing/invalid API key

---

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