{ "lexicon": 1, "id": "place.hud.createTheme", "description": "Make a theme for the workspace.", "defs": { "main": { "type": "procedure", "description": "Write a place.hud.theme record in the person's own repository, for anyone to choose. It is not chosen: setTheme does that. 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": [ "name", "colorScheme", "palette" ], "properties": { "name": { "type": "string", "maxLength": 640, "maxGraphemes": 64, "description": "What the theme is called." }, "colorScheme": { "type": "string", "maxLength": 16, "knownValues": [ "light", "dark" ] }, "palette": { "type": "ref", "ref": "place.hud.defs#palette" } } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "theme" ], "properties": { "theme": { "type": "ref", "ref": "place.hud.defs#theme", "description": "The theme made, by its uri." } } } }, "errors": [ { "name": "InvalidRequest", "description": "A name that is blank; a palette whose texts do not all read at 4.5:1 (checkTheme names which); or the person's PDS refused the write." }, { "name": "AuthRequired", "description": "No live web session or HUD access token: sign in." } ] } } }