# place.hud.checkTheme

> Whether every text of a palette reads at 4.5:1 or better on what it is drawn on, as createTheme and setTheme hold one: each pair that falls short. It writes nothing. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.

- Kind: procedure
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.checkTheme)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.checkTheme/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.checkTheme/analytics)

## Procedure (`place.hud.checkTheme`)

Type: procedure · POST

### Input (application/json)

- `palette` (ref, required)
  - Reference: `place.hud.defs#palette`

### Output (application/json)

- `problems` (array, required): Each pair under 4.5:1; none when it reads.
  - `items` (ref)
    - Reference: `place.hud.defs#contrastProblem`

### Errors

- `InvalidRequest`: A colour not as #rrggbb.
- `AuthRequired`: No live web session or HUD access token: sign in.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Whether every text of a palette reads at 4.5:1 or better on what it is drawn on, as createTheme and setTheme hold one: each pair that falls short. It writes nothing. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "A colour not as #rrggbb.",
          "name": "InvalidRequest"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "palette": {
              "ref": "place.hud.defs#palette",
              "type": "ref"
            }
          },
          "required": [
            "palette"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "problems": {
              "description": "Each pair under 4.5:1; none when it reads.",
              "items": {
                "ref": "place.hud.defs#contrastProblem",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "problems"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Check a palette's contrast.",
  "id": "place.hud.checkTheme",
  "lexicon": 1
}
```
