---
title: "Query Hex"
method: POST
path: "/query/hex"
---

# Query Hex

`POST /query/hex`

## 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/query/hex`
- Auth: none declared

Find nearest archive colours to a hex value.
Optional: restrict to one archive.

Example:
    {"hex": "#D4AF37", "n_results": 5}
    {"hex": "#2030A0", "archive": "Pigment"}

## Headers

- `x-api-key` string, nullable

## Request body

- HexQuery
  - `hex` string, required
  - `n_results` integer
  - `archive` string, nullable
  - `archives` unknown[]
    - unknown
  - `include_narrative` boolean

## 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)
