{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "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.",
      "errors": [
        {
          "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": "InvalidRequest"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "colorScheme": {
              "knownValues": [
                "light",
                "dark"
              ],
              "maxLength": 16,
              "type": "string"
            },
            "name": {
              "description": "What the theme is called.",
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "palette": {
              "ref": "place.hud.defs#palette",
              "type": "ref"
            }
          },
          "required": [
            "name",
            "colorScheme",
            "palette"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "theme": {
              "description": "The theme made, by its uri.",
              "ref": "place.hud.defs#theme",
              "type": "ref"
            }
          },
          "required": [
            "theme"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Make a theme for the workspace.",
  "id": "place.hud.createTheme",
  "lexicon": 1
}
