> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Put v1panelsettingstheme

> Requires settings.write. Refused when any text pair falls below 3:1 against its own background, which is under the loosest threshold WCAG 2.2 defines for any text. A pair between 3:1 and 4.5:1 is saved and reported as a warning, because a brand tone that fails AA is a decision an operator is entitled to make and be told about.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml put /v1/panel/settings/theme
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/panel/settings/theme:
    put:
      tags:
        - panel
      description: >-
        Requires settings.write. Refused when any text pair falls below 3:1
        against its own background, which is under the loosest threshold WCAG
        2.2 defines for any text. A pair between 3:1 and 4.5:1 is saved and
        reported as a warning, because a brand tone that fails AA is a decision
        an operator is entitled to make and be told about.
      operationId: savePanelTheme
      parameters:
        - $ref: '#/components/parameters/CSRFToken'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - theme
                - version
              properties:
                theme:
                  $ref: '#/components/schemas/ThemeDocument'
                version:
                  type: integer
                  description: >-
                    The version the screen was showing. A mismatch is a conflict
                    rather than an overwrite.
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PanelTheme'
        '403':
          $ref: '#/components/responses/Problem'
        '409':
          $ref: '#/components/responses/Problem'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    CSRFToken:
      in: header
      name: X-CSRF-Token
      required: true
      description: >-
        Echoes the token from the current session. Required on every unsafe
        method.
      schema:
        type: string
  schemas:
    ThemeDocument:
      type: object
      description: >-
        An operator's overrides. Every field is optional, and an omitted one
        keeps the design's own value. A palette maps a themable token name to a
        hex colour and accepts nothing else, because these values are rendered
        into a style element.
      properties:
        light:
          type: object
          additionalProperties:
            type: string
        dark:
          type: object
          additionalProperties:
            type: string
        radius:
          type: string
          enum:
            - square
            - compact
            - default
            - rounded
        density:
          type: string
          enum:
            - compact
            - default
            - comfortable
        allowedThemes:
          type: array
          items:
            type: string
            enum:
              - light
              - dark
          description: >-
            Which modes a visitor may switch between. One mode removes the
            switcher rather than leaving it inert.
        defaultTheme:
          type: string
          enum:
            - light
            - dark
            - system
    PanelTheme:
      type: object
      required:
        - theme
        - css
        - warnings
        - themable
        - version
        - updatedAt
      properties:
        theme:
          $ref: '#/components/schemas/ThemeDocument'
        css:
          type: string
          description: The declarations to inline. Empty when nothing has been customised.
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ThemeWarning'
        themable:
          type: array
          items:
            type: string
          description: The token names this build honours.
        version:
          type: integer
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
          format: uuid
    ThemeWarning:
      type: object
      required:
        - code
        - mode
        - foreground
        - background
        - ratio
        - blocking
      properties:
        code:
          type: string
          enum:
            - pair_unreadable
            - pair_below_aa
        mode:
          type: string
          enum:
            - light
            - dark
        foreground:
          type: string
        background:
          type: string
        ratio:
          type: number
          description: The WCAG contrast ratio, from 1 to 21.
        blocking:
          type: boolean
          description: True below 3:1, which refuses the save.
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.