Extract Colours from Image
extract_image_coloursExtract dominant colours from a photograph using Colour Memory's proprietary k-means++ algorithm. Requires either a public image_url, or an image_id. If you only have a raw uploaded file with no public URL (e.g. a local file path or a ChatGPT file attachment without a usable download_url), call ingest_image first to get an image_id, then pass that image_id here. Returns hex values with proportional weights. Optionally matches colours against the archive with style_context for coherent cultural naming. Use this before image_brief when you have an uploaded photograph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Number of colours to extract (3-12, default 6) | |
| image | No | Image file attachment from ChatGPT | |
| analyse | No | If true, match colours against archive and return names | |
| image_id | No | Ephemeral image_id returned by ingest_image. Use this if you only have a local file path or raw file attachment with no public URL. | |
| image_url | No | Public URL of image | |
| grey_card_hex | No | Hex from a grey/white card for white balance | |
| style_context | No | e.g. English cottage garden, Victorian, Japanese |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||