{ "lexicon": 1, "id": "place.hud.checkTheme", "description": "Check a palette's contrast.", "defs": { "main": { "type": "procedure", "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.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "palette" ], "properties": { "palette": { "type": "ref", "ref": "place.hud.defs#palette" } } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "problems" ], "properties": { "problems": { "type": "array", "items": { "type": "ref", "ref": "place.hud.defs#contrastProblem" }, "description": "Each pair under 4.5:1; none when it reads." } } } }, "errors": [ { "name": "InvalidRequest", "description": "A colour not as #rrggbb." }, { "name": "AuthRequired", "description": "No live web session or HUD access token: sign in." } ] } } }