# Judge a palette being edited (seven colours, or brand colours with overrides)

`POST /hosting/design-library/palette/evaluate` · Rivier · hosting

Judge a palette being edited (seven colours, or brand colours with overrides): every contrast and colour-blind check with its result, the colours as seen with each kind of colour blindness, and the smallest change that fixes what fails. Stores nothing.

- Scope: hosting:read
- Mcp: rivier_design_library_evaluate_palette
- Graphql: Query.hostingLibraryEvaluatePalette
- Sdk: hosting.library.evaluatePalette
- Cli: hosting library evaluate palette

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "brand": {
      "type": "object",
      "properties": {
        "colors": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "minItems": 1,
          "maxItems": 6
        }
      },
      "required": [
        "colors"
      ],
      "additionalProperties": false
    },
    "colors": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "pattern": "^#[0-9a-fA-F]{6}$"
      }
    },
    "mode": {
      "type": "string",
      "enum": [
        "light",
        "dark"
      ],
      "default": "light"
    }
  },
  "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/palette/evaluate' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "brand": {
    "colors": [
      "string"
    ]
  },
  "colors": {},
  "mode": "light"
}'
```
