# Hosting library extract colours

`POST /hosting/design-library/extract-colours` · Rivier · hosting

Colours from a logo or a picture (sent as base64) and the readable palette built from them, with every contrast correction listed. Nothing is stored.

- Scope: hosting:read
- Mcp: rivier_design_library_extract_colours
- Graphql: Query.hostingLibraryExtractColours
- Sdk: hosting.library.extractColours
- Cli: hosting library extract colours

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "minLength": 20,
      "maxLength": 4200000,
      "description": "The image as base64 (PNG, JPEG, WebP or GIF, up to 3 MB)"
    },
    "name": {
      "type": "string",
      "maxLength": 60
    }
  },
  "required": [
    "image"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/design-library/extract-colours' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "image": "string"
}'
```
