1. Getting Started & Architecture

Theme Designer Pro is an Event Function that themes your whole Open WebUI instance: color palettes, gradients, animated Canvas FX backgrounds and custom CSS. Admins design the instance theme every user sees, from the Themes tab in the Admin section of Settings or at {ROUTE_BASE} directly. With the Allow Personal Themes valve on, every user can also design a personal theme of their own (see Section 4). Themes are saved on the server and reach every open page live.

  • Who Can Open It: Only administrators can open the instance designer and save the instance theme. With Allow Personal Themes on, every signed-in user except a pending account can open the same designer on their own theme, at {ROUTE_BASE}?scope=me or from their Themes tab in Settings.
  • How the Theme Reaches Pages: Theme Designer Pro never writes to Open WebUI’s files. It publishes a script into /static/loader.js and a safe subset of the theme CSS into /static/custom.css through a shared registry, composed fresh on every request (see Section 23). That subset holds the palette and your custom CSS, so they paint before Open WebUI draws its interface, with no flash. The state JSON, without Canvas FX scripts, is inlined into the loader too. On each load, the bootloader fetches {ROUTE_BASE}/theme.css and {ROUTE_BASE}/state.json for the full theme. localStorage keeps the last theme seen, applied before that fetch completes and kept as an offline fallback, so on a browser that has seen the theme before, the background animation starts at once; on a first visit it starts when state.json arrives. A personal theme keeps its own copy, tagged with the account it belongs to.
  • Theme Files: The instance theme is saved in DATA_DIR/theme/ as open_theme_designer.css, open_theme_designer.json, open_theme_designer_sections.json (structured CSS sections) and open_theme_designer_library.json. Personal themes use the same names in DATA_DIR/theme/users/<user id>/. Uploaded pictures are saved beside them as auth_background (the sign-in page picture) and page_background (the Other pages picture), and a personal theme keeps its own page_background in its folder. Saves hold DATA_DIR/theme/.save.lock so two workers never write at once. A theme file with bytes that aren’t UTF-8 is read with those bytes replaced, and the server logs a warning once per file; the next save that changes the theme writes it back as UTF-8. A library file that isn’t a JSON object is renamed to open_theme_designer_library.json.corrupt-<date>-<time> when the designer opens, including the one the Launcher loads out of sight to apply a chat theme, so the next gallery save can’t overwrite it, and the next designer page you see says which file it kept.
  • Live Push via SSE: Theme changes are broadcast to all connected users in real time using Server-Sent Events. Each save pushes a short version token to every open tab, and each page refetches the CSS and state after a random delay of up to 2 seconds, or skips it when its ETags show it already has that version. The channel at {ROUTE_BASE}/events reconnects 3 seconds after a dropped connection, waits longer after an HTTP error such as a proxy’s 502 (doubling each time to a minute, then randomized by up to half either way, so at most about 90 seconds), and survives function hot-reloads. A personal theme save reaches only that user’s own pages, on every device they’re signed in on: each page claims its connection with its own sign-in token, so it works even when Open WebUI’s sign-in cookie is missing. With several workers, Redis carries the updates between them (see Section 22). Each worker accepts up to 8,192 connections; a page over that limit retries a minute later, fetching any change it missed each time, and still gets the theme on every load. A page whose connection comes back fetches what it missed over up to 2 seconds, so a restart doesn’t send every page at once.
  • Several Designers at Once: Each open designer holds the theme and the gallery in memory. When one saves a change, every other designer showing the same theme reloads to show it, in another tab or window, in Settings, in the Admin Panel or at {ROUTE_BASE}. A designer doesn’t reload while you’re typing in one of its editors, while it’s saving or while it has a dialog open, and waits for that first, so what you typed is saved before it reloads. A save carries the whole theme, so the last save wins: a designer that saves while it waits replaces the other designer’s change with its own copy of every setting. It reloads at most once every 5 seconds, so a change made in several saves, as a Global Reset can be, ends in one more reload once that time is up. In Draft mode, it shows a message instead and keeps your draft. The save a designer makes on its own as it opens changes nothing for the others: an identical one is skipped, and any other is marked so they don’t reload for it. A designer whose live connection was cut, or refused by a proxy while Open WebUI restarted, reconnects on its own and reloads if a save landed while it was away.
  • SSE Heartbeat: The server sends a keep-alive heartbeat every 15 seconds to detect stale connections. If a client disconnects (closes the tab, loses network), the server-side queue is automatically cleaned up.
  • SSE Hot-Reload Persistence: SSE connections survive function re-saves (hot-reloads). The client list is stored on the ASGI app's state object, which persists across module reloads, so re-saving the function code in the admin panel does not break live push to existing tabs.
  • Turning the Function Off and On: Turning the function off fires function.disable_started. Theme Designer Pro then broadcasts a theme-disable event that strips the theme from every open page. It also withdraws its CSS from /static/custom.css and removes the Themes tabs from open Settings dialogs. The loader stays published but inactive, so its live connection survives. Turning it back on fires function.enable_started, which republishes the CSS, reactivates the loader, and broadcasts the theme to every page.
  • Server Sync: Changes save to the server automatically by POST to {ROUTE_BASE} (or {ROUTE_BASE}/me for a personal theme): a single change at once, and while you drag a slider, 250 ms after you stop. The server saves the CSS, sections and state files and broadcasts a version token; the next request for /static/loader.js or /static/custom.css already includes the save. Open pages fetch the new theme within a moment of the broadcast, spread over up to two seconds when many are connected so they don’t all ask at once. A page whose live connection dropped and came back, and every page after a Global Reset, fetches over the same spread. A page in a background tab fetches it when it’s shown again. A theme save the server doesn’t take, because the function is off or the save failed on the way (a server error or no connection), is never sent again on its own, since another designer may have saved since. The instance designer switches to Draft mode with a message, and the change waits there as a draft until you Publish it, after you turn the function back on if it was off. The personal designer, which has no Draft mode, holds its saves with a Retry bar; Retry sends them, and asks first if your theme was saved somewhere else since. The held theme is also kept in the browser tab, so a reload, or a designer in Settings that was closed, offers to save it when the personal designer next opens. A library change that fails waits on the page and goes with your next library change. When another designer saves the gallery, a page in Live mode reloads to show it. One that doesn’t reload, in Draft mode or holding a personal save, pauses its gallery saves until it reloads, since each one sends the whole gallery: it keeps the draft or the unsaved theme and says so. A gallery change still waiting then, or made while paused, is not saved, and the page says so after it reloads. One the server refuses, such as one over the size limit, says why. While a personal save or a library change waits, leaving or reloading the page asks first, and while a personal save waits the designer doesn’t reload for another tab’s save. A reset or Use instance theme drops what waits.
  • Draft Mode: Switch between Live and Draft with the switch in the footer. In Draft mode, changes stay on the designer page; they aren’t saved to the server or pushed to other users until you click Publish or switch back to Live. See Section 9.
  • Hot Reload: The function hot-reloads when updated in the admin panel; no server restart is needed. The theme’s CSS is built in the designer page, so CSS changes a new version brings reach Open WebUI pages once an admin opens the instance designer in Live mode, which saves the theme as it opens. A personal theme is rebuilt when its owner opens their own designer.
  • Auto-Save: Your active theme configuration is saved automatically after every change. Use the Save (+) button only to create named snapshots in your theme gallery.
  • Core Palette: The OKLCH color palette is enabled by default for all modes. Use the Enabled toggle in the Core Palette section to disable palette generation for a specific mode if you prefer to manage colors entirely through manual overrides.
  • Auth Pages: You can selectively toggle theme components (Colors, Custom CSS, Canvas FX, and Gradient Background) for the Login/Signup screens using the individual Show on Auth Pages checkboxes. By default, all four components are visible on auth pages. Beside each one, Only on Auth Pages keeps that component off the rest of Open WebUI, so it shows on the Login/Signup screens alone: a gradient or an animation for the sign-in page that stays out of your chats, for example. It needs Show on Auth Pages. The Enable Auth Page Theming valve hides every one of these checkboxes and turns them off. A personal theme never reaches the auth pages, which always show the instance theme, so the designer in a user’s own Settings hides these checkboxes.
  • Layer Order: The generated CSS applies in this order: OKLCH Palette → Manual Variable Overrides → Structural Rules (with the Surfaces rules when that tab is on) → Gradient Background → Custom CSS → valve rules (overlay glass, the hidden sidebar fades and the mobile sidebar fix, when those valves are on). Each layer can override the one before it.
  • Session Persistence: The designer uses sessionStorage to remember which tab you were working in, and restores it when you come back.
  • Legacy Data Migration: Upgrading from an older version? The designer detects legacy data structures and migrates your saved snapshots and active themes to the latest format without data loss. A theme in the single-palette format from before modes (a top-level h, c and l, and neither a dark nor a light mode) is read the same way from a file, a paste, a library backup or an install link.
  • Following Open WebUI’s Mode: If you change Open WebUI’s theme in another tab, or in Settings around the embedded designer, the designer switches its mode tab to match. A change of your system’s light or dark setting re-renders the System view.
  • Self-Adapting UI & Contrast Protection: The designer interface themes itself with the colors you pick. Built-in contrast protection measures its own text, muted text and accent against the backgrounds they sit on and picks colors that meet WCAG AA (4.5:1 for text, 3:1 for the accent and the keyboard focus ring), so the designer stays legible with very washed-out palettes.
  • Fully Responsive: The designer adapts to phone screens, so you can tweak your theme on the go.
  • Canvas FX Security: Canvas FX scripts are JavaScript. An instance theme’s script runs in every user’s browser, and only administrators can set it. A personal theme’s script runs only in its owner’s browser. Never paste untrusted scripts; always review Canvas FX code before enabling it, especially scripts from third parties. A script whose very first characters are /* tdp:isolated */ runs isolated: in a sandboxed frame with a policy that allows no requests, so it can draw but gets no cookies, storage, page or network, never runs on the page itself, and gets an empty env.authToken even with Enable Canvas Api Access on. Adding that line is a way to run a script you haven’t fully read. It needs a browser with OffscreenCanvas, and without one the script doesn’t run at all.
  • Routes: Everything is served under {ROUTE_BASE}. /theme.css, /state.json, /events and reading /auth-background need no sign-in, because the sign-in page uses them. The designer page, saving the instance theme, /library.json, and changing /auth-background or /page-background are for admins. Any signed-in user except a pending account can use ?scope=me, /me and its /me/theme.css, /me/state.json, /me/library.json and /me/page-background, plus /consult, /events/bind and reading /page-background. A route takes the sign-in token as Authorization: Bearer or the token cookie, and a save needs Content-Type: application/json. A save, an upload or removal of a picture, /consult and /events/bind sent by a web page on another origin answer 403, because the browser sends the cookie from sibling sites too and Open WebUI’s default CORS lets any origin through. Over plain HTTP that check compares the page’s host with the forwarded Host or WEBUI_URL (see Reverse Proxy Configuration). Requests from scripts and curl, which send no Origin, are unaffected.
  • Valves: Admins turn features on and off and set policies in the function’s valves; Section 2 lists them all.
2. Valves

Valves are set in Admin Panel > Functions > Theme Designer Pro > ⚙️. They take effect as soon as you save them: Open WebUI runs the function on save, and other workers pick the change up over Redis. Changes to Enable Canvas FX, Sidebar Transparency and Overlay Transparency are pushed to open pages right away. Other valve changes apply on each page’s next load. The designer reads the valves when its page loads, so reload an open designer to see a change there.

ValveDefaultWhat It Does
Enable Canvas FXOnOff: hides the Canvas FX tab, stops running animations, and serves every theme without its Canvas FX. The scripts stay saved.
Calm Chat ColumnOffOn: each animation fades behind the chat by its own Center Calm setting. Off: every script’s Center Calm counts as 0, so animations show at full strength across the whole page. The scripts themselves are unchanged. The valve reaches a script through a line of the form const CENTER_CALM = <number>;, as the bundled presets write it; a script that keeps its calm amount anywhere else, such as in a CONFIG object, isn’t affected.
Enable Custom CSSOnOff: hides the Style Overrides tab. Custom CSS that’s already saved keeps being served.
Enable Gradient BuilderOnOff: hides the Gradient tab. Gradients that are already saved keep being served.
Enable AI ConsultantOnShows the AI button in the designer (see Section 5).
Enable Theme Update ChecksOnOff: hides the Updates button and each theme’s update check, and the designer makes no update requests (see Section 15).
Enable Community ThemesOnOff: hides the Community Themes browser and skips its catalog fetch (see Section 20).
Enable Auth Page ThemingOnOff: hides every Show on Auth Pages and Only on Auth Pages checkbox and turns them off, so login pages keep Open WebUI’s own look. Opening the designer while it’s off saves those checkboxes as off, so turning the valve back on leaves them off until you tick them again.
Draft Mode DefaultOffOn: the instance designer opens in Draft mode on every load, reloads included, even after you publish (see Section 9).
Show In Admin SettingsOnAdds a Themes tab to the Admin section of Settings (see Section 3).
Show In Admin PanelOffAdds a Themes page to the Admin Panel’s top bar, between Functions and Settings (see Section 3).
Allow Personal ThemesOffOn: every user gets a Themes tab in their own Settings for a personal theme (see Section 4). Off again: everyone is back on the instance theme, and personal themes are kept.
Auto SyncOffOn: Sync copies every part of the current mode to all the other modes without asking, and a gallery theme applies without the Apply Library Theme dialog. A Sync All switch in the footer then decides whether loading a theme or preset changes all four modes or only the current one.
Sidebar TransparencyopaqueThe chat sidebar’s background: opaque, translucent (frosted glass) or transparent (turned into translucent on phones). Open WebUI’s fades at the top and bottom of the sidebar, above the user menu, show only while it’s opaque, with or without Canvas FX.
Overlay TransparencyopaqueSettings, menus and dialogs: opaque or translucent (frosted glass). The fade at the top of chats, under the chat title, shows only while it’s opaque, with or without Canvas FX.
Enable Canvas Api AccessOffOn: gives every Canvas FX script the viewing user’s Open WebUI token, so it can call the API as them. Leave it off unless you wrote or fully reviewed every script.
Enable Url ImportOnShows the URL field and Load URL button in the import dialogs. A convenience switch in the browser, not a security boundary.
Allowed Import DomainsEmptyComma-separated domains that URL imports, update checks and Community Themes may fetch from, each one with its subdomains. Empty allows any. Enforced in the browser as a guardrail, not a security boundary.
Designer Url/api/v1/theme-designerWhere the designer is served. A path that doesn’t start with /api/v1/ is corrected to one that does, and characters other than letters, digits, /, _, . and - are removed. A path ending in /me is refused and the default is used instead, because personal themes use that name. After a change, the old address keeps serving the theme to pages that were already open, until Open WebUI restarts; the designer, saves and the library move to the new address at once. Uploaded Sign-in page and Other pages pictures move with it, saved themes included, so there’s no need to upload them again.
Ai Consultant ModelEmptyThe model the AI Consultant asks, by its ID. Empty: the task model under Admin Settings > Interface (see Section 5). An ID that isn’t a model on this instance makes the AI Consultant answer with an error instead of falling back.
3. The Themes Tab in Settings and the Admin Panel

Admins can open the designer without leaving Open WebUI: Settings has a Themes tab in its Admin section, right after Interface. It shows the same designer in a frame that fills the panel, and the Show In Admin Settings valve turns it off. The designer stays available at {ROUTE_BASE} either way.

  • Styled Like Open WebUI: In Settings, the designer’s header row takes Open WebUI’s look: the page title is left to the tab, and the mode and header buttons are smaller and borderless. Everything below the header looks as it does at the designer’s own URL. The Admin Panel’s Themes page uses the same header.
  • Live Around You: Edits save live as usual, so Settings restyles around the designer while you work. Switching to another Settings tab and back keeps the designer where you left it.
  • Searchable: The Settings search box finds the tab by words such as “theme”, “designer”, “palette” or “canvas”. While the search holds words that don’t match, the tab is hidden like any other.
  • Frosted Glass: With Overlay Transparency set to translucent, the designer’s page turns clear, so Settings’ frosted glass shows behind it. It stays solid while you edit a mode whose light or dark look differs from Open WebUI’s, so its text stays readable.
  • Personal Tab: With Allow Personal Themes on, every user, admins included, also gets a Themes tab in the Personal section, after Interface, for their own theme (see Section 4). Users see it after their next page load.
  • Which One Is In Use: A green dot marks the Themes tab whose theme the page is showing: the Admin one for the instance theme, the Personal one for your own. While your own theme is showing, hovering the Admin tab says it replaces the instance theme for you. A user without the Admin tab sees a green ring on their own tab while the instance theme is showing, and a dot once they save a theme of their own.
  • A Page in the Admin Panel: With the Show In Admin Panel valve on, the Admin Panel’s top bar gets a Themes page between Functions and Settings, with the same designer filling the page. Settings opens its dialog over it, and any other page of the bar, or navigating elsewhere, closes it. A reload shows the page you were on before you opened Themes.
  • Turning the Function Off removes the Settings tabs and the Admin Panel page from open pages.
4. Personal Themes

With the Allow Personal Themes valve on, every user can design a theme of their own from the Themes tab in the Personal section of Settings. It opens this designer on their own theme, marked My theme in the header.

  • Only They See It: A personal theme replaces the instance theme for its owner alone. Everyone else keeps the instance theme.
  • It Follows the Account: It’s saved on the server, in DATA_DIR/theme/users/<user id>/, so it shows on every browser and device the user signs in from. Saving it updates their other open pages live, and nobody else’s.
  • It Shows Before Open WebUI Draws, from a copy in the browser, the same way the instance theme does.
  • Within Your Valves: Canvas FX, Custom CSS, the Gradient Builder, Community Themes, URL import and the transparency styles apply as they do for the instance theme.
  • Saves Wait for a Real Change: A personal theme starts from the instance theme and is saved only once the user changes something. Opening the tab, or switching it between modes, leaves them on the instance theme and its later updates.
  • Use Instance Theme: This button removes the personal theme and keeps the user’s saved themes and presets. The personal designer has no Draft mode and no Global Reset.
  • Moving From the Legacy Tool: The old Theme Designer Pro Tool kept a theme in each browser. The first time a page loads with this function, that theme is set aside, and when the user opens their personal Themes tab, the designer offers to start their personal theme from it. Start from it also saves it to their gallery as “From the Theme Designer Pro Tool”, so Use instance theme can’t lose it. The offer shows only while the user has no personal theme, and after Start from it or Not now it doesn’t come back in that browser.
  • Deleted Accounts: When an account is deleted, from the Users page or by SCIM, its personal theme and library are removed, as long as the function is on.
  • Turning the Valve Off puts everyone back on the instance theme and keeps their personal themes in case you turn it on again.
5. AI Consultant

The AI button in the header turns a few words into a theme. Describe what you want, such as “warm copper” or “calm ocean at night”, and a model on your instance picks the hue, chroma and lightness, plus a matching gradient when the description suits one. You then fine-tune the result with the sliders.

  • What It Changes: Only the palette, and the gradient when the Gradient Builder is on. It turns the palette on for each mode it changes, and OLED keeps lightness 0. Custom CSS, Canvas FX and locked colors stay as they are. Apply it to every mode, or tick Only the … mode for the one you’re editing.
  • Which Model: The one in the Ai Consultant Model valve, or, when that’s empty, the task model under Admin Settings > Interface, local first, then external. The request runs your instance’s pipeline filters like any other.
  • Who Can Use It: Admins can always use it, and users can when Allow Personal Themes is on, on their own theme. Open WebUI asks the model as the signed-in person, so users need access to that model, as they do for chat titles. Each person can send one request every 3 seconds.
  • A Gradient That Won’t Show: If the mode’s Custom CSS Snippet sets its own background gradient, the AI’s gradient is saved but hidden behind it, and the confirmation says so (see Section 17).
  • Turning It Off: The Enable AI Consultant valve removes the button.
6. Theming From a Chat: the Launcher Tool

The Theme Designer Pro Launcher is a companion Tool for theming from a chat. Describe a theme, such as “make my chat a koi pond” or “a forest green theme, like moss after rain”, and the Launcher builds a whole theme: a palette and accent in the colors asked for, an animated Canvas FX background picked from the presets catalog, frosted glass panels, or a gradient when it’s still. The chat shows it as a card with a live preview. Apply puts it on and adds it to the Theme Gallery, and Undo puts back the theme from before. Ask it to open the designer and it opens this designer in the chat instead.

  • Whose Theme Changes: The person’s own personal theme, which needs Allow Personal Themes on. An admin who asks for a theme “for everyone” changes the instance theme instead.
  • What Apply Does: The card opens this designer out of sight with a link the Launcher signed, hands it the theme, and the designer applies and saves it the way an import would, then closes. Open pages follow live.
  • Animations a Chat Model Writes: When the catalog has nothing that fits, the chat model can write a new Canvas FX animation (Launcher 2.1.0 or later, best with the theme-designer-pro skill from the presets repository). The Launcher checks it and marks its first line /* tdp:isolated */, and Theme Designer Pro runs a marked script isolated: in a sandboxed frame with no origin and a policy that allows no requests, so it can draw but gets no cookies, storage, page or network, and never runs on the page itself. The card shows it as “(new)” with View code.
  • Why a Link Can’t Change a Theme: The designer never applies a theme that is simply written into its address or sent to it. The Launcher signs the theme’s SHA-256 with Open WebUI’s WEBUI_SECRET_KEY for the one person who asked, and the designer applies only a theme with that hash, only for that person, within 30 days, and only where it was meant to land. The theme’s Canvas FX script comes from the catalog the server fetched or, when the chat model wrote it, runs isolated as described above, so Apply asks no second question about it. Links from Launchers before 2.0 carry colors alone and apply for five minutes.
  • CSS That Fetches Is Refused: The designer checks a chat theme’s custom CSS again before it saves it, whichever Launcher signed it, both as written and as it would reach pages with Auto-Scope on or off. An @import, a url(), image-set() or src() that isn’t a quoted data: URL such as url("data:…"), however it’s spelled or escaped, or a comment or string left open, and Apply saves nothing. A chat theme brings no Manual Overrides. A theme or CSS snippet from an install link gets the same check, its Manual Overrides included. CSS you write in the designer yourself, or bring in from a file, a paste or an address you type, isn’t checked, so it can still load fonts and images.
  • The Setting It Needs: Everyone who uses it needs Settings > Interface > iframe Sandbox Allow Same Origin on to apply a theme or open the designer in a chat. Without it, the card still previews the theme and names the setting. With it on, HTML that tools and models show in chats runs with the page’s access, so turn it on only on an instance whose tools you trust.
  • Getting It: Install it from its page on the Open WebUI community platform, or from the launcher/ folder of the presets repository, whose README covers its valves.
7. OKLCH Foundation & Modes

Unlike standard hex-based themes, this designer uses the OKLCH color space to generate perceptually uniform palettes. This means the visual "weight" of colors remains identical as you shift hues.

  • Global Modes: Easily switch between Dark, OLED (pure black), Light, Her, and System modes using the segmented toggle. Settings, variables, and CSS are managed entirely separately for each mode. System mode proxies to your OS preference (see Section 8). In Live mode, picking a mode tab also switches Open WebUI itself, in your other tabs and in Settings around the embedded designer; in Draft mode it switches only the designer. Note: when the page loads, the designer reads Open WebUI’s enable_easter_eggs setting from /api/config and shows the Her tab if it’s on, or if Open WebUI is already in Her mode.
  • Hue / Chroma / Lightness: Control the base angle, intensity, and brightness. Double-click a slider’s label to reset it to its default.
  • Accent Colors: Under the sliders, three swatches show the mode’s accents. Each starts on Auto: the palette’s hue, lighter on dark modes and deeper on light ones, with the second and third 40° to either side, so they follow the sliders. At Chroma 0, the default, the automatic accents are gray. Pick a color to set one for this mode, for a theme whose look is two colors the hue can’t give, and click ⟲ to set it back to automatic (double-click the row’s label for all three). Canvas FX scripts that follow the theme draw in them, and theme CSS reads them as var(--tdp-accent), var(--tdp-accent-2) and var(--tdp-accent-3); click an accent’s name to copy its variable. Sync copies them with the palette.
  • Tonal Ramp: Below the sliders, the OKLCH Tonal Ramp visualizes the generated 12-step color scale. Click any block in the ramp to copy its hex value to your clipboard.
  • Sync: Click the Sync button in the footer to selectively copy palette, overrides, CSS, Canvas FX, Gradient Background, Surfaces, or auth settings from the current mode to one or more target modes. Colored badges appear next to each option indicating whether the source and target are already in sync or have differences, and each option’s ▾ opens what differs. Syncing into OLED sets its lightness to 0. When the source and target modes both came from the same gallery theme, Sync copies that theme’s own data for the target mode. The Auto Sync valve skips this dialog and adds a Sync All switch to the footer instead.
8. System Theme & OS Integration

The System mode allows Open WebUI to automatically follow your Operating System's theme preference (Light vs. Dark).

  • Real-time Detection: The designer actively listens for OS theme changes. Switching your system to Dark mode will instantly apply your Dark design set, including your specific Canvas FX and Custom CSS. System follows only Dark and Light; it never picks OLED or Her.
  • Isolation: When in System mode, the designer acts as a proxy for the currently active design. Editing sliders or overrides will save data to the design set your system is currently using.
  • Dual-Layer CSS: The generated CSS includes native @media (prefers-color-scheme) blocks for Dark and Light. This keeps your theme applied even if browser class management is delayed or overridden by the application.
9. Draft Mode & Publishing

Draft Mode lets you preview and iterate on theme changes without pushing them live to users. It's designed for safe experimentation.

How It Works

  • Toggle: Click the Live / Draft switch in the footer to enter Draft mode. A pulsing amber dot appears next to Draft, and the header badge changes from Theme Active to Draft Active (it reads Theme Inactive while the function is off; hover it to see who changes reach).
  • Starting in Draft: The Draft Mode Default valve opens the instance designer in Draft mode on every load, reloads included, even after you publish. Without the valve, a reload keeps the tab in Draft while it holds a draft. The personal designer has no Draft mode, because only its owner sees the result.
  • A Theme It Can’t Read: If the saved theme can’t be read (a hand-edited or damaged open_theme_designer.json), the instance designer says so and opens in Draft mode, on this tab’s Draft or the defaults. It does so on every load until the theme is replaced, and Publish asks before replacing it. The personal designer, which has no Draft mode, saves nothing until you change something. The server never stores a state that isn’t a JSON object: a theme save with one is refused. Undo on a chat card that applied a theme over it can’t put it back, and says so.
  • Local-Only: In Draft mode, theme CSS and state are not synced to the server or pushed to other users via SSE. Library changes (snapshots and presets) still save to the server at once, without the draft’s CSS or state. An uploaded picture that the draft removes or resets stays on the server until you Publish, and uploading a picture waits for Live mode, since it would replace the published one at once. The designer page is your preview surface.
  • Draft Isolation: In Draft mode, theme CSS and state are written to sessionStorage, which only this tab can read, and never sent to the server. Other pages read the theme from the server, so the draft’s look stays in this tab. A library change made in Draft does reach the server, and other open designers reload to pick it up.

Publishing

  • Publish Button: Click the Publish button that appears in Draft mode to push all pending changes to the server and broadcast them via SSE to everyone the theme reaches: all users, or with Allow Personal Themes on, everyone who isn’t using a theme of their own. The toast says who it reached. While the function is off, publishing fails with the server’s error message; turn the function back on first.
  • Toggle Back: Switching the toggle from Draft back to Live is equivalent to clicking Publish: it triggers the same sync and broadcast.
  • Discard: If you close the tab without publishing, your draft changes are lost, because they are stored in sessionStorage, which is tab-scoped and destroyed when the tab closes. Within the same tab session, draft changes survive page refreshes. The last-published server-side theme remains active for everyone else.

What Draft Mode Does NOT Do

  • It does not apply draft changes to regular Open WebUI pages, even for the admin. The designer page is the only preview surface.
  • It does not persist draft state across browser sessions or tab closures. Closing the tab or browser discards the draft. However, refreshing the page within the same tab session preserves your working state via sessionStorage.
10. Variable Overrides & Locks (🔒)

While the OKLCH engine dynamically calculates a 12-step ramp, you can manually override any individual step in the Individual Variable Overrides section below the tonal ramp.

Color Picker Overrides

  • Locking Variables: Clicking the lock (🔒) icon pins a variable. Locked variables are protected and will NOT be overwritten if you change the OKLCH sliders, randomize the theme, or extract a palette from an image. Use the bulk Lock All / Unlock All buttons to quickly pin or release the entire variable set at once. Picking a color in a swatch sets that variable and locks it. Moving a palette slider clears every unlocked override.
  • Resetting: Each variable’s ⟲ unlocks it and puts back its palette color. ⟲ Reset All clears every unlocked override in the mode and puts Hue, Chroma and Lightness back to 250, 0 and 20 (0 in OLED); when every variable is locked, it asks first and offers Unlock & Reset.
  • Click-to-Copy: Click any step label (e.g., 900) to copy its CSS declaration (--color-gray-900: #hex;) to your clipboard.
  • Contrast Preview: Each color swatch features an Aa contrast preview badge for at-a-glance legibility assessment. The badge text color automatically adjusts based on the swatch's lightness to remain readable.

Accessibility Contrast Report

Directly under the tonal ramp, the Accessibility Contrast panel scores the four text-on-background pairs Open WebUI actually renders for the current mode: main and muted text on the page background, main text on panels, and main text on the sidebar. Each row shows a foreground-on-background swatch, the WCAG 2.1 contrast ratio, the steps compared (for example, 50 on 900), and a rating badge: AAA (≥7:1), AA (≥4.5:1), AA large (≥3:1, valid for large or bold text only), Fail, or Unknown for a color that only resolves in the live page, such as var(--…). A summary reports how many of the measured pairs clear AA. It recomputes live as you move a slider, edit an override, or switch modes.

  • Measured on the solid background. With a Canvas FX or gradient background active, the visible backdrop is an animation that has no single contrast value; the report scores against the solid palette color, which is the fallback every user still sees.
  • Washed-out palettes. If a palette is bright enough that the built-in contrast protection engages, the panel notes it. That protection keeps the designer page itself legible; Open WebUI pages get the palette exactly as scored.
  • What ships is what’s measured. Manual Variable Overrides are applied before scoring, with a note saying how many values came from them, and a mode whose palette is disabled is scored on its defaults, with a note.

Manual Variable Overrides

Below the color picker grid, you'll find the Manual Variable Overrides code block. This feature is inspired by the legacy Open WebUI Theming system fork and gives power users direct control over CSS custom properties.

  • Purpose: Define raw CSS variable declarations (e.g., --color-gray-900: #1a1a2e;) that are injected after the generated palette, giving them final override priority.
  • Mode-Specific: Overrides are saved independently per mode (Dark, OLED, Light, Her). Switching modes loads that mode's specific overrides.
  • Enabled Toggle: Use the checkbox to quickly enable or disable manual overrides without losing your code. Clear empties the editor and Copy copies its text.
  • Syntax: Write one variable per line using standard --variable-name: value; syntax. Comments (/* */ and //) are automatically skipped, and so are lines that don’t start with -- or that contain { or }. The designer appends !important for you.
  • System Mode: Manual overrides include automatic @media (prefers-color-scheme) support, ensuring they work correctly when the user's OS theme preference is set to System.
11. Custom CSS & Auto-Scoping

Write raw CSS overrides in a code editor with auto-indentation and auto-closing pairs (brackets, parentheses, and quotes). Your CSS is saved per-mode. Use the Preset Gallery to save, rename, and manage reusable snippets.

  • Enabled Toggle: Each mode’s custom CSS has an Enabled checkbox, off by default. Typing in the editor doesn’t turn it on; loading or saving a snippet does. The Enable Custom CSS valve hides this tab, but CSS that’s already saved keeps being served.
  • Auto-Scope: When enabled, your CSS is wrapped in the mode’s selector as a native CSS nesting block, and :root and a bare html become &. @keyframes blocks are extracted and placed outside the wrapper. This prevents your Dark mode CSS from accidentally ruining your Light mode styling.
  • Raw Mode: Disable Auto-Scope if you prefer to write global rules or your own target selectors. In this mode, :root references become :is(<mode selector>).
  • System Mode: Dark and Light custom CSS is also emitted inside @media (prefers-color-scheme) blocks for people on System.
  • Accent Colors: Use var(--tdp-accent), var(--tdp-accent-2) and var(--tdp-accent-3) for highlights instead of hex values. Every mode defines them, with the colors set under Accent Colors in the Core Palette tab or the ones generated from the palette, so one rule follows each mode and every later palette change.
  • Show on Auth Pages: Toggle whether your custom CSS applies on Login/Signup screens. Enabled by default. Only on Auth Pages beside it keeps the CSS off the rest of Open WebUI. The Enable Auth Page Theming valve hides both and turns them off.
  • Personal Themes: Custom CSS in a personal theme affects only its owner.
  • Import/Export: Drop .css files (up to 16 MB each) onto the designer to add them to the Preset Gallery as snippets, then load one to use it. Export your snippets to share them.
  • Editor Features: The code editor traps the Tab key to insert 2-space indents, includes a synced line number gutter, and auto-closes matching brackets and quotes as you type. The editor’s Save button adds the CSS to the Preset Gallery, Clear empties it and Copy copies it.

Changing Fonts

You can change the global font family for your entire Open WebUI instance by pasting a CSS rule into the editor. Set the font on the document root and the form controls, then let it inherit down. Form elements (input, textarea, button, select) are listed too: browsers don’t pass the font to them, and while Open WebUI’s base styles do, listing them keeps the rule working if that changes. Avoid painting the font onto the universal selector *: it clobbers icon fonts and code/math spans. Here are a few quick examples:

Native OS (San Francisco / Segoe UI)

html, body, input, textarea, button, select {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, sans-serif !important;
  letter-spacing: -0.01em !important;
}

Hacker Terminal (Monospace)

html, body, input, textarea, button, select {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace !important;
}

Editorial (Serif)

html, body, input, textarea, button, select {
  font-family: 'Georgia', 'Cambria', 'Times New Roman', serif !important;
  line-height: 1.65 !important;
}
Writing Style Overrides That Last

A one-liner like * { border-radius: 2.5px !important; font-family: monospace !important; } works, but the universal selector plus !important is a blunt hammer. It's fine for a throwaway experiment and the wrong foundation for a reusable preset. Four rules of thumb keep overrides working across Open WebUI updates and other themes:

  • Scope to .app, not *. Open WebUI's signed-in interface lives inside .app (the designer page uses #theme-designer-container). The sign-in page (#auth-page) and shared chats are outside it, and so are dropdowns, submenus, modals and tooltips, which are portaled onto document.body. Your CSS already beats Tailwind’s utility classes, because Open WebUI puts them in a cascade layer and your CSS isn’t in one; scoping to .app adds specificity against Open WebUI’s other rules and leaves those portaled menus with their native, readable styling.
  • Let fonts inherit; don't paint them on *. Set font-family on html, body (plus the form controls) and it cascades everywhere. Putting it on * also overrides icon fonts and code/math spans.
  • Target the utility, not every node. To round corners, hit the elements that already carry a radius utility and skip the fully round ones; otherwise you flatten circular avatars, pill toggles, and status dots into rounded squares.
  • Reserve !important for the properties that need it. Your Style Overrides snippet comes after the palette, structural and gradient layers, but those layers mark their own declarations !important, so overriding a color, background or gradient they set needs !important too. For anything they don’t set, such as corner radius or spacing, you rarely need it.

Blunt (breaks avatars & toggles)

* {
  border-radius: 2.5px !important;
}

Targeted (corners tighten, circles survive)

.app :where([class*="rounded-"]:not([class*="rounded-full"])) {
  border-radius: 2.5px;
}
::selection {
  background: #FFFF00;
  color: #000;
}

Note: there is no #app element in Open WebUI; it's .app (a class). Selectors targeting #app silently do nothing. See Section 18: Structural Transparency for the full container/portal layout.

12. Canvas FX Animations

Inject interactive JavaScript animations directly into the background of Open WebUI. The designer automatically applies a Structural Layer that makes native UI components transparent so the animation shines through.

  • Background Worker Execution: By default, scripts run in a true background Web Worker using OffscreenCanvas (if supported by your browser) to ensure high-performance rendering without blocking the UI thread. Both Canvas 2D and WebGL/WebGL2 contexts are supported: call canvas.getContext('2d') for standard drawing or canvas.getContext('webgl2') for GPU-accelerated shader rendering (see WebGL Rendering below). A script that uses the word document in its code, outside comments, is sent straight to the main thread. The status badge in the designer shows the predicted execution mode, from the browser’s capabilities and that text check: Background Worker (OffscreenCanvas), Main Thread (DOM Access) (the script contains document), Main Thread (Fallback) (the browser lacks OffscreenCanvas), Isolated Frame (the script starts with /* tdp:isolated */), or Won’t Run (No OffscreenCanvas) (an isolated script in a browser without OffscreenCanvas). If the Worker reports an uncaught error, the engine also moves the script to the main thread; the badge doesn’t change in that case, because it shows the prediction, not the live path. A script whose first characters are /* tdp:isolated */ is the exception to all of this: it always runs in a sandboxed frame (see Section 1, Canvas FX Security), even when it says document, and a Worker error stops it instead of moving it. Next to the status badge, a WebGL badge appears when the script asks for a WebGL context, a Context badge when it handles context messages, and a Follows Theme badge when it handles theme messages.
  • Event Handling: Thirteen message types are sent to your script via self.onmessage: init, resize, mousemove, click, mousedown, mouseup, touchstart, touchmove, touchend, context, theme, motion and layout. Touch events also generate synthetic mouse equivalents for cross-device compatibility.
  • Show on Auth Pages: Toggle whether canvas animations appear on Login/Signup screens. Enabled by default. Only on Auth Pages beside it keeps the animation off the rest of Open WebUI. When the Enable Auth Page Theming valve is off, both are hidden and off in every mode, and a personal theme’s designer hides them too.
  • Animation Settings: Under the editor, the script’s own settings appear as sliders, switches and color pickers, read from its CONFIG (or CFG) object or the constants at its top. A constant counts when its name is in capitals, it sits on a line of its own above the first function, class or onmessage line, and its value is a number, true/false, or a quoted '#rgb' or '#rrggbb' color. A comment line such as // ── Colors ── becomes a heading over the settings below it. A change rewrites that one value in the script, as if you had typed it, so the animation restarts with it. Reset to the script’s values puts back the script as it was before your first change, as long as you haven’t changed the script another way since, and Undo works too. A range written in the setting’s comment, such as (0.5-3), sets the slider’s range. While the Calm Chat Column valve is off, Open WebUI pages run every script with CENTER_CALM at 0, whatever its slider says.
  • Preset Gallery: Save, rename, overwrite with the editor’s script, delete, and export individual animations, and import native .js animation files by dragging them into the designer. The gallery has search, a sort, and a type filter (All, WebGL, Context, Follows Theme, DOM Access).
  • The Enable Canvas FX valve: turning it off hides this tab, stops animations that are running, and serves every theme with its Canvas FX left out. The scripts stay saved, so turning the valve back on restores them.
  • Personal themes: with Allow Personal Themes on, users can add Canvas FX to their own theme. It runs only in their own browser, and the Enable Canvas FX valve covers it too.
Canvas Worker Protocol

Your Canvas FX script runs inside a Web Worker with an OffscreenCanvas. The runtime communicates with your script using a structured message protocol via self.onmessage. Understanding this contract is essential for writing reliable animations.

Inbound Messages (Runtime → Your Script)

Thirteen message types are dispatched to your script's self.onmessage handler:

Type Payload When
init { canvas, width, height, dpr, reducedMotion, column, env, theme } Fired once on startup. theme is the active mode's palette, the same object a theme message carries (see Theme-Aware Animations). canvas is an OffscreenCanvas transferred via postMessage. Call canvas.getContext('2d') for 2D drawing, or canvas.getContext('webgl2') (with 'webgl' fallback) for GPU-accelerated shader rendering. width and height are the initial viewport dimensions, in CSS pixels. dpr is the screen’s device pixel ratio, which a worker can’t read for itself: size the canvas at width * dpr for sharp lines, within a pixel budget, since the canvas element is stretched to the viewport either way. reducedMotion is true when the viewer has asked their system to reduce motion; slow the animation down, drop flashes and sudden movement, or hold it still. column is where the chat column sits, as { x, width, left, right } in CSS pixels: its center and width, and the left and right edges of the chat area around it, which leave out the sidebar. width is never more than Open WebUI’s usual 58rem, even when widescreen mode stretches the chat across the window, and in a window too narrow for margins it narrows further, down to 320 px at the least, until a band of width / 2 + 56 fading out by 1.2 times that ends a strip short of each edge of the chat area (56 px or 8% of the chat area’s width, whichever is larger), so the margins beside it stay lively. It is null on a page without a chat. With the sidebar open the column sits right of the screen’s center, so keep your calm band on it, and put focal points in the margins between left and the column or the column and right, where the sidebar won’t cover them. env provides runtime context: { authToken, baseUrl, locale, timezone }. authToken is the token of whichever user is viewing the page, and is an empty string unless an admin has enabled the Enable Canvas Api Access valve, or always for an isolated script. A script given it can call the Open WebUI API as that user. theme can be null if the palette couldn’t be built, so check it before reading its colors.
resize { width, height, dpr } Fired 150 ms after the browser window stops resizing, and after a zoom, which changes dpr. Update your internal width/height and canvas.width/canvas.height accordingly. In main-thread mode, the engine resizes the canvas element itself first.
mousemove { x, y } Fired on cursor movement (throttled to once per requestAnimationFrame). Coordinates are clientX/clientY (viewport-relative). Also fired by touchmove (first finger) for cross-device compatibility, and by a framed page that posts { type: 'owui-canvas-mousemove', x, y } to the window, which is how the designer forwards the cursor when it’s shown inside Settings or a chat.
click { x, y } Fired on a click, after its mousedown and mouseup. To answer a click or tap, use mousedown alone, so one tap acts once.
mousedown { x, y } Fired when a mouse button is pressed. Also fired synthetically on touchstart (first finger), and the browser can send its own after a tap, so one tap can arrive as two. Use with mouseup for drag interactions.
mouseup { x, y } Fired when a mouse button is released. Also fired synthetically on touchend (first finger).
touchstart { touches: [{x, y}, ...] } Fired when a finger touches the screen. The touches array contains all current touch points, enabling multi-touch interactions. Also generates a synthetic mousedown.
touchmove { touches: [{x, y}, ...] } Fired on finger movement (throttled to once per requestAnimationFrame). Also bridges to mousemove (first finger) so mouse-only scripts work on touch devices.
touchend { touches: [{x, y}, ...] } Fired when a finger is lifted. The touches array contains the changedTouches (fingers that were removed). Also generates a synthetic mouseup.
context { messages, chars, estimatedTokens } or { exactTokens, promptTokens, completionTokens, source } The first shape is the engine’s estimate from the page: sent right after init and when you switch chats, then at most every 2 seconds while the chat changes, during a streaming reply too, and only when a count changed. The second shape carries exact counts from the server after a reply (see Context-Aware Animations). messages counts the user and assistant messages in the chat, chars is the total character count of the user and assistant messages, and estimatedTokens is chars / 4, rounded up. Enables context-aware animations that grow or change as the conversation progresses. External scripts can also dispatch custom data via window.dispatchEvent(new CustomEvent('owui-canvas-context', { detail: { ... } })).
theme { mode, dark, hue, chroma, colors, rgb, ramp } Fired when the palette changes while your script runs: a switch to a mode that uses the same script, a theme update, or a palette edit in this designer. The same object also arrives with init as e.data.theme. Handling it is optional; a script that ignores it keeps its own colors. See Theme-Aware Animations.
motion { reducedMotion } Fired when the viewer turns the system’s reduce-motion setting on or off while your script runs. The starting value arrives with init.
layout { column } Fired when the chat column moves or changes width: the sidebar opening or closing, Widescreen Mode, a resize, or a page with or without a chat. column is { x, width, left, right } or null, as in init.

Messages Back to the Page

The runtime doesn’t listen to anything your script posts back with self.postMessage(). A script needs no heartbeat or keepalive to keep running, and the house validator fails a script that sends one.

Animation Loop

requestAnimationFrame() is available inside Web Workers that hold an OffscreenCanvas. Use it for your render loop. Avoid using setInterval for rendering: requestAnimationFrame syncs to the display refresh rate, and whenever the page stops getting frames, because its tab is hidden or its window is covered, the runtime holds its callbacks until frames come back. Firefox doesn’t pause a worker’s frames on its own, and a page that keeps drawing unseen can fill the GPU’s memory. A setInterval loop keeps drawing all the same.

Lifecycle & Cleanup

The runtime terminates the worker and revokes its Blob URL when the script or its enabled state changes: switching to a mode with a different script, turning Canvas FX off, or opening a login page where Show on Auth Pages is off; entering Open WebUI while Only on Auth Pages is on; or removing the theme. Switching between modes that use the same script keeps the running worker. In a Worker, termination is immediate, so your script doesn’t need to clean up after itself. On the main thread nothing is terminated: only the engine’s own listeners and the script’s bare timer and frame calls are cleared, so a script that adds its own listeners or elements there must remove them itself.

Main Thread Fallback

Your script runs on the main thread in three cases: (1) the browser doesn’t support OffscreenCanvas, (2) the script uses the word document outside comments, or (3) the Worker reports an uncaught error. This is not a sandbox: the script runs inside a function on the page itself, with full access to window, document, cookies and localStorage. In this mode:

  • The canvas in the init message is a standard <canvas> DOM element (not an OffscreenCanvas).
  • A synthetic self object is provided with onmessage, addEventListener('message', fn) and a no-op postMessage. A bare onmessage = fn assignment works too.
  • requestAnimationFrame, setInterval and setTimeout calls are tracked and cleared on teardown. Call them as bare functions: self.requestAnimationFrame doesn’t exist on the main thread.
  • Assign your handler as self.onmessage = … or onmessage = …. Declaring it with let, var or function onmessage collides with the engine’s own and throws.
  • Your script code should work identically in both modes as long as you use the self.onmessage pattern and don’t rely on Worker-specific APIs beyond what’s listed here.

Minimal Script Template

/**
 * Title: My Animation
 * Description: One line on what it draws and how it responds.
 */

/* ────────── CONFIGURABLE VARIABLES ────────── */
const COUNT = 60;          // how many motes (10-300)
const SPEED = 40;          // rising speed, in px per second (5-200)
const CENTER_CALM = 0.7;   // how much they fade behind the chat column (0-1)
const FOLLOW_THEME = true; // take the color from the theme's palette
/* ──────────────────────────────────────────── */

let canvas, ctx, w = 0, h = 0, dpr = 1;
let reduced = false, last = 0, column = null;
let color = '#8ab4ff', dark = true;
const mouse = { x: -10000, y: -10000 };
const xs = new Float32Array(COUNT), ys = new Float32Array(COUNT);

function applyTheme(t) {
  if (!t) return;
  dark = t.dark !== false;
  if (FOLLOW_THEME && t.colors) color = t.colors.accent;
}

function size() {
  canvas.width = Math.max(1, Math.round(w * dpr));
  canvas.height = Math.max(1, Math.round(h * dpr));
  ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
  for (let i = 0; i < COUNT; i++) { xs[i] = Math.random() * w; ys[i] = Math.random() * h; }
}

// 1 - CENTER_CALM over the chat column, easing back to 1 by 1.25 times its
// half-width, the same band as the reference script nebula_webgl.js
function calm(x) {
  const cx = column ? column.x : w / 2, half = column ? column.width / 2 + 56 : 520;
  const d = Math.min(1, Math.max(0, (Math.abs(x - cx) / half - 0.55) / 0.7));
  return 1 - CENTER_CALM * (1 - d * d * (3 - 2 * d));
}

function frame(now) {
  requestAnimationFrame(frame);
  const dt = last ? Math.min((now - last) / 1000, 0.1) : 0;
  last = now;
  const speed = reduced ? SPEED * 0.2 : SPEED;
  ctx.clearRect(0, 0, w, h);
  ctx.fillStyle = color;
  for (let i = 0; i < COUNT; i++) {
    ys[i] -= speed * dt;
    if (ys[i] < -4) ys[i] = h + 4;
    ctx.globalAlpha = (dark ? 0.8 : 0.5) * calm(xs[i]);
    ctx.fillRect(xs[i], ys[i], 3, 3);
  }
  ctx.globalAlpha = 1;
}

self.onmessage = (e) => {
  const d = e.data;
  switch (d.type) {
    case 'init':
      canvas = d.canvas;
      ctx = canvas.getContext('2d');
      w = d.width; h = d.height; dpr = Math.min(d.dpr || 1, 2);
      reduced = !!d.reducedMotion;
      column = d.column || null;
      applyTheme(d.theme);
      size();
      requestAnimationFrame(frame);
      break;
    case 'resize':
      w = d.width; h = d.height; dpr = Math.min(d.dpr || 1, 2);
      size();
      break;
    case 'theme':
      applyTheme(d);
      break;
    case 'motion':
      reduced = d.reducedMotion;
      break;
    case 'layout':
      column = d.column || null;
      break;
    case 'mousemove':
      mouse.x = d.x; mouse.y = d.y;
      break;
    case 'mousedown':
      // A click or tap at d.x, d.y. Every click on the page arrives here,
      // the Send button's too, so keep the response gentle.
      break;
  }
};
Context-Aware Animations

The Canvas FX engine includes a built-in context data channel that lets your animation react to the live state of the chat conversation. This enables a powerful category of themes: visuals that grow, fill, or evolve as the user’s context window fills up, providing an ambient visual indicator of how much context remains.

How It Works

The engine provides two complementary data sources for context tracking, both delivered as context messages to your script. They run only for a script that names the string 'context' outside comments, as case 'context': does; the Context badge shows the same test.

1. DOM Observer (every 2 seconds, during streaming)

A MutationObserver on the #messages-container element watches for message changes. A change starts a 2-second timer if none is running; when it ends, the observer scans the .chat-user and .chat-assistant areas and sends:

{ type: 'context', messages: 8, chars: 12400, estimatedTokens: 3100 }
  • messages: the number of user and assistant messages in the chat
  • chars: total character count across all user and assistant messages
  • estimatedTokens: a rough token estimate, chars / 4 rounded up

2. Socket Interceptor (exact, after each response)

The engine intercepts WebSocket messages from Open WebUI’s Socket.IO connection. When a Socket.IO event carries usage data, the exact token counts are forwarded. For streamed replies from OpenAI-compatible connections, Open WebUI asks for that data only when the model’s Usage capability is on; Ollama replies report it either way. Like Open WebUI, the engine keeps only events for the chat in view, including a new chat that has no /c/ address yet, and skips the shared copy a chat sends to your other tabs. The counts are best-effort: the engine hears the socket from its first send after a context-reading script first starts on the page. That comes at once for a reply this tab starts (Open WebUI’s socket sends every second while it streams), but a reply this tab didn’t start, such as one in another tab, one still streaming across a reload, or one started through the API, can be missed for about half a minute at default settings (the socket’s ping interval, WEBSOCKET_SERVER_PING_INTERVAL, is 25 seconds and its heartbeat 30), and the estimate stands. Once installed, the hook stays for the page’s life and does nothing while no script reads context.

{ type: 'context', exactTokens: 137, promptTokens: 48, completionTokens: 89, source: 'socket' }
  • exactTokens: usage.total_tokens, or the prompt + completion sum when total_tokens is absent
  • promptTokens / completionTokens: exact breakdown (supports OpenAI-style prompt_tokens/completion_tokens and Anthropic-style input_tokens/output_tokens field names)
  • source: always 'socket' to distinguish from DOM estimates

Your script receives both. The DOM observer sends an estimate at most every 2 seconds, so the character count grows during a streaming reply, while the socket interceptor sends an exact snapshot after each response completes. Prefer exactTokens when available, and keep it in a variable: the next estimate arrives within 2 seconds and has no exactTokens, so reading both from the same message lets the estimate replace the exact count at once.

When the chat container leaves the page, for example on a new empty chat, the DOM observer sends { messages: 0, chars: 0, estimatedTokens: 0 }. Switching between two chats that both have messages simply delivers the new chat’s counts. Socket token counts aren’t reset when you change chats.

Building a Growth Animation

The core pattern is simple: compute a growth ratio (0 to 1) from the estimated tokens vs. your model’s context limit, then map that ratio to visual stages in your animation. Here’s the recommended approach:

const MAX_TOKENS = 128000;   // adjust to your model's context limit
const GROWTH_SPEED = 1;      // set to 10-50 for fast testing
let contextRatio = 0;        // smoothed 0-1 value
let targetRatio = 0;         // raw target from context events
let exactTokens = 0;         // the last exact count from the server
let estimatedTokens = 0;     // the last estimate from the page

// In your message handler:
case 'context':
  if (e.data.messages === 0) { exactTokens = 0; estimatedTokens = 0; }  // an empty chat
  if (e.data.exactTokens != null) exactTokens = e.data.exactTokens;
  if (e.data.estimatedTokens != null) estimatedTokens = e.data.estimatedTokens;
  // Exact counts arrive after each reply; estimates fill in until the first one
  targetRatio = Math.min(1, ((exactTokens || estimatedTokens) / MAX_TOKENS) * GROWTH_SPEED);
  break;

// In your render loop (smooth interpolation):
contextRatio += (targetRatio - contextRatio) * 0.01;

// Then use contextRatio to drive visual stages:
if (contextRatio < 0.1) { /* seed / empty state */ }
else if (contextRatio < 0.4) { /* early growth */ }
else if (contextRatio < 0.7) { /* mid growth */ }
else if (contextRatio < 0.9) { /* full growth */ }
else { /* warning: context nearly full */ }

Design Ideas

Any visual metaphor that has a recognizable progression from “empty” to “full” works well. Some examples:

Theme Growth Metaphor Warning State
Sunflower Seed → sprout → stem → leaves → bud → full bloom Petals droop, sky turns red
Mushroom Farm Mycelium threads → pins → caps → bioluminescent clusters Spore cloud thickens, red pulse
Bathtub Empty tub → water rising → bubbles → overflowing Water overflows the rim
Wheat Field Bare soil → seedlings → tall stalks → golden harvest Field catches fire
Hourglass Sand flowing from top to bottom, grains accumulating Final grains falling, red glow

Tips

  • Smooth interpolation is essential. Context updates arrive in steps, at most every 2 seconds. Without easing (ratio += (target - ratio) * 0.01), the animation will jump abruptly between states.
  • Use GROWTH_SPEED for testing. At MAX_TOKENS = 128000, you’d need a very long conversation to see full growth. Set GROWTH_SPEED = 50 during development so a few messages take you through the entire lifecycle.
  • Stagger growth across elements. If your scene has multiple objects (mushroom clusters, wheat stalks), give each a random growStart offset so they don’t all appear simultaneously. This creates a much more natural, organic feel.
  • Add a warning state. When contextRatio > 0.85, add a visual cue (color shift, pulsing glow, drooping) so the user knows context is running low. That warning is the point of the feature.
  • Include a token counter. A small, subtle overlay showing ~3.1k / 128k tokens with a mini progress bar gives precise context alongside the ambient visual metaphor.
  • Handle chat switching. A new empty chat sends messages: 0, and another chat with messages sends its own counts. Your animation should ease to the new value, or snap instantly, depending on the metaphor.

Custom Event API

External scripts (Open WebUI event functions, tools, or browser extensions) can also send context data directly to the Canvas FX script, alongside the built-in DOM observer, while a Canvas FX script that reads context is running (one that names the string 'context' outside comments). Other scripts don’t receive these events. This is useful if you have access to exact token counts from API responses:

// From any script running on the Open WebUI page:
window.dispatchEvent(new CustomEvent('owui-canvas-context', {
  detail: {
    messages: 12,
    chars: 48000,
    estimatedTokens: 12000,
    // You can include any extra fields; they're forwarded as-is
    exactTokens: 11847,
    maxContext: 128000
  }
}));

The engine forwards the entire detail object to your Canvas FX script as a context message. Your script can read any custom fields you include. Don’t put a type field in detail: it replaces context.

Theme-Aware Animations

The engine hands your script the active mode’s palette, so an animation can draw in the theme’s colors instead of its own. Change the hue in the Core Palette tab and a theme-aware animation recolors as you drag; switch from Dark to Light and it follows. It is opt-in: a script that never reads the palette keeps drawing exactly as it always has.

When It Arrives

  • With init, as e.data.theme, so the first frame can already use it.
  • As a theme message whenever it changes while your script runs: a mode switch that keeps the same script, a theme update from the server, or a palette edit here. It is only sent when something in it changed.

Payload

{
  type: 'theme',
  mode: 'dark',          // 'dark', 'oled', 'light' or 'her'
  dark: true,            // false on Light and Her: dark text on a light page
  hue: 265,              // the palette's hue, 0-360
  chroma: 0.025,         // the palette's chroma, 0 for a neutral theme
  colors: {              // '#rrggbb', for 2D canvas styles
    background, surface, text, muted,
    accent, accent2, accent3
  },
  rgb: { ... },          // the same colors as [r, g, b] from 0 to 1, for WebGL
  ramp: { '50': '#...', ..., '950': '#...' }   // the --color-gray-* ramp
}
  • background: the page color for this mode. surface: one step raised, like the input bar. text and muted: the main and secondary text colors.
  • accent: the palette’s hue at a color made for the mode, lighter on dark modes and deeper on light ones, at four times the palette’s chroma, kept between 0.06 and 0.18. accent2 and accent3 sit 40° to either side of it. A theme at Chroma 0, or a mode with its palette off, gets gray accents.
  • A theme can set any of the three for a mode under Accent Colors in the Core Palette tab, for a look made of colors the hue can’t give, such as amber and teal. A set accent arrives in place of the generated one, so a script keeps followTheme on instead of hard-coding the theme’s colors. The theme’s CSS gets the same three as var(--tdp-accent), var(--tdp-accent-2) and var(--tdp-accent-3).
  • The colors are read from the page, so per-step overrides and the OLED blacks are already in them.

The Pattern

const CONFIG = {
  followTheme: true,   // Draw in the theme's colors when the designer sends them (true/false)
};

let colors = { bg: '#000000', glow: '#66ccff' };   // your own defaults
let light = false;

function applyTheme(t) {
  if (!CONFIG.followTheme || !t || !t.colors) return;
  colors = { bg: t.colors.background, glow: t.colors.accent };
  light = t.dark === false;
  // Rebuild anything cached in the old colors here
}

// In your message handler:
case 'init':
  // ...set up the canvas...
  applyTheme(e.data.theme);
  break;
case 'theme':
  applyTheme(e.data);
  break;
  • Keep your defaults. Older engines send no palette, and followTheme: false turns it off, so the script must still draw well in its own colors.
  • Recolor, don’t restart. A theme message can arrive mid-animation. Swap the colors and rebuild cached gradients or sprites, but keep particles and positions where they are.
  • Mind light modes. When dark is false the animation sits behind dark text on a light page. Additive blending such as 'lighter' disappears there, so draw with 'source-over' and keep alphas modest.
  • WebGL: pass rgb entries straight to uniform3fv.

A script that handles theme messages gets a Follows Theme badge in the editor and matches the preset gallery’s Follows Theme filter, and the website’s Studio shows followTheme as a switch with the rest of a script’s settings.

WebGL Rendering

Canvas FX scripts are not limited to the 2D Canvas API. Since OffscreenCanvas supports WebGL and WebGL2 contexts, your scripts can run full GLSL fragment shaders on the GPU, for effects that are impossible or impractical with 2D canvas: raymarching, domain-warped fractal noise, volumetric lighting, metallic reflections, and real-time fluid simulations.

Why WebGL?

Canvas 2D WebGL
Execution CPU, single-threaded GPU, massively parallel
Per-pixel math getImageData (slow) Fragment shader (native)
Noise / fractals ~10fps for 6-octave FBM 60fps trivially
Effects possible Particles, lines, fills Raymarching, volumetrics, fluid sim, SDF

Minimal WebGL Template

/**
 * Title: My Shader
 * Description: Soft drifting bands in the theme's accents that stay calm behind the chat.
 */

/* ────────── CONFIGURABLE VARIABLES ────────── */
const INTENSITY = 0.6;     // how strongly it shows (0-1)
const SPEED = 1;           // overall speed (0-3)
const CENTER_CALM = 0.7;   // how much it fades behind the chat column (0-1)
const FOLLOW_THEME = true; // take the colors from the theme's palette
const RENDER_SCALE = 0.5;  // resolution of the soft bands (0.25-1)
/* ──────────────────────────────────────────── */

let canvas, gl, prog, uTime, uRes, uCol, uAlpha, uC1, uC2;
let w = 0, h = 0, t = 0, last = 0, reduced = false, column = null, lost = false;
let c1 = [0.45, 0.6, 1], c2 = [0.7, 0.45, 0.95], dark = true;

const VERT = 'attribute vec2 a;void main(){gl_Position=vec4(a,0.,1.);}';
const FRAG = [
  '#ifdef GL_FRAGMENT_PRECISION_HIGH',
  'precision highp float;',
  '#else',
  'precision mediump float;',
  '#endif',
  'uniform float u_time;',
  'uniform vec2 u_res;',
  'uniform vec2 u_col;',   // the chat column's center x and calm half-width, in render pixels
  'uniform float u_alpha;',
  'uniform vec3 u_c1;',
  'uniform vec3 u_c2;',
  'void main(){',
  '  vec2 uv = gl_FragCoord.xy / u_res;',
  '  float wave = 0.5 + 0.5 * sin(uv.y * 6.0 + u_time * 0.4 + sin(uv.x * 4.0 + u_time * 0.3));',
  '  float band = abs(gl_FragCoord.x - u_col.x) / u_col.y;',
  '  float calm = 1.0 - ' + CENTER_CALM.toFixed(3) + ' * (1.0 - smoothstep(0.55, 1.25, band));',
  '  float a = u_alpha * calm * smoothstep(0.6, 1.0, wave);',   // only the crests, so the theme shows between them
  '  gl_FragColor = vec4(mix(u_c1, u_c2, wave) * a, a);',   // premultiplied, so the theme shows through
  '}'
].join('\n');

function shader(type, src) {
  const sh = gl.createShader(type);
  gl.shaderSource(sh, src);
  gl.compileShader(sh);
  if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) { console.error(gl.getShaderInfoLog(sh)); return null; }
  return sh;
}

function setup() {
  const vs = shader(gl.VERTEX_SHADER, VERT), fs = shader(gl.FRAGMENT_SHADER, FRAG);
  if (!vs || !fs) return false;
  prog = gl.createProgram();
  gl.attachShader(prog, vs);
  gl.attachShader(prog, fs);
  gl.linkProgram(prog);
  if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) { console.error(gl.getProgramInfoLog(prog)); return false; }
  gl.useProgram(prog);
  // One triangle that covers the whole viewport
  gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);
  const a = gl.getAttribLocation(prog, 'a');
  gl.enableVertexAttribArray(a);
  gl.vertexAttribPointer(a, 2, gl.FLOAT, false, 0, 0);
  uTime = gl.getUniformLocation(prog, 'u_time');
  uRes = gl.getUniformLocation(prog, 'u_res');
  uCol = gl.getUniformLocation(prog, 'u_col');
  uAlpha = gl.getUniformLocation(prog, 'u_alpha');
  uC1 = gl.getUniformLocation(prog, 'u_c1');
  uC2 = gl.getUniformLocation(prog, 'u_c2');
  return true;
}

function size() {
  canvas.width = Math.max(1, Math.round(w * RENDER_SCALE));
  canvas.height = Math.max(1, Math.round(h * RENDER_SCALE));
}

function applyTheme(d) {
  if (!d) return;
  dark = d.dark !== false;
  if (FOLLOW_THEME && d.rgb) { c1 = d.rgb.accent; c2 = d.rgb.accent2; }
}

function frame(now) {
  requestAnimationFrame(frame);
  const dt = last ? Math.min((now - last) / 1000, 0.1) : 0;
  last = now;
  if (lost || !prog) return;
  // Wrapped at a whole number of the waves' cycles, so the wrap is seamless
  t = (t + dt * SPEED * (reduced ? 0.2 : 1)) % 628.3185;
  const cx = column ? column.x : w / 2, half = column ? column.width / 2 + 56 : 520;
  gl.viewport(0, 0, canvas.width, canvas.height);
  gl.uniform1f(uTime, t);
  gl.uniform2f(uRes, canvas.width, canvas.height);
  gl.uniform2f(uCol, cx * RENDER_SCALE, half * RENDER_SCALE);
  gl.uniform1f(uAlpha, INTENSITY * (dark ? 0.5 : 0.3));
  gl.uniform3fv(uC1, c1);
  gl.uniform3fv(uC2, c2);
  gl.drawArrays(gl.TRIANGLES, 0, 3);
}

self.onmessage = (e) => {
  const d = e.data;
  switch (d.type) {
    case 'init': {
      canvas = d.canvas;
      w = d.width; h = d.height;
      reduced = !!d.reducedMotion;
      column = d.column || null;
      applyTheme(d.theme);
      const opts = { premultipliedAlpha: true, antialias: false, depth: false, powerPreference: 'low-power' };
      gl = canvas.getContext('webgl2', opts) || canvas.getContext('webgl', opts);
      if (!gl) { console.warn('My Shader: WebGL is unavailable'); return; }
      canvas.addEventListener('webglcontextlost', (ev) => { ev.preventDefault(); lost = true; });
      canvas.addEventListener('webglcontextrestored', () => { lost = !setup(); });
      size();
      setup();
      requestAnimationFrame(frame);
      break;
    }
    case 'resize':
      w = d.width; h = d.height;
      if (canvas) size();
      break;
    case 'theme':
      applyTheme(d);
      break;
    case 'motion':
      reduced = d.reducedMotion;
      break;
    case 'layout':
      column = d.column || null;
      break;
  }
};

Key Differences from 2D Scripts

  • Context: Call canvas.getContext('webgl2') with a 'webgl' fallback instead of '2d'.
  • Drawing: All rendering happens in GLSL fragment shaders compiled and linked into a WebGL program. Build shader source as an array of strings joined with '\n'.
  • Geometry: Use the fullscreen triangle trick: a single triangle with vertices [-1,-1, 3,-1, -1,3] covers the entire viewport without quad seam artifacts.
  • Uniforms: Pass u_time (float), u_res (vec2), and u_mouse (vec2, normalized 0 to 1) to the shader. Flip mouse Y for GL coordinates: 1.0 - (e.data.y / h).
  • No DOM: WebGL runs natively in Workers, with no DOM access needed. The same script works in both Worker and fallback modes.
  • Porting from ShaderToy: map iTime→u_time and iResolution.xy→u_res, call ShaderToy’s mainImage(fragColor, gl_FragCoord.xy) from your own main(), and write the result to gl_FragColor. ShaderToy’s iMouse is a pixel-based vec4, while u_mouse here is a normalized vec2, so convert where the shader uses it.
  • Other contexts: the engine hands your script the canvas as is, so in a browser that supports WebGPU on OffscreenCanvas, canvas.getContext('webgpu') works too. The WebGL badge doesn’t detect WebGPU scripts.

Shader Techniques Reference

  • FBM (Fractal Brownian Motion): Layer 5 or 6 octaves of noise for organic detail. Use domain warping (feeding one noise result into another) for deep organic flow.
  • Iq Color Palette: a + b * cos(6.28 * (c*t + d)) generates smooth, curated color gradients from four vec3 parameters.
  • Surface Normals: Estimate normals from a heightfield by sampling 3 nearby points, enabling specular highlights, rim lighting, and fake environment reflections.
  • Voronoi: Find nearest/second-nearest seed points for crystalline cell patterns. Multiply two offset Voronoi grids to create underwater caustic patterns.
  • Vignette: 1.0 - dot(uv - 0.5, uv - 0.5) * strength darkens edges for a natural focal effect.
13. Advanced Tools & Image Extraction

These utilities sit across the designer: Randomize and Extract under the palette sliders, { } JSON in the header, Undo, Redo and the resets in the footer, and Factory Reset in the Danger Zone.

  • Extract from Image: Click the Extract button to upload an image, or paste an image directly from your clipboard (Ctrl+V). The designer finds the image’s dominant color, ignoring near-black, near-white and grey pixels, and applies its hue and chroma to the current mode. It also resets lightness to 20% (0% in OLED) and clears unlocked overrides; locked variables stay as they are. An image with no colored pixels at all shows an error instead.
  • Randomize: Generates a cohesive random palette. Locked variables will remain unaffected.
  • Undo / Redo: Full history support via the Undo and Redo buttons in the footer, or Ctrl+Z / Ctrl+Y (Cmd on macOS). The shortcuts don’t fire while you’re typing in a field. Typing, a wheel turn or a dragged gradient stop becomes one step once you pause, and Undo right away still undoes just that step. The history keeps the last 50 steps of everything in the four modes: palette, accent colors, overrides, locks, CSS, Canvas FX, Manual Variable Overrides, Gradient Background and Surfaces. The Backgrounds tab isn’t in it: Undo after Reset Mode or Global Reset leaves that tab reset and says so, and a picture the reset deleted can’t come back.
  • Reset Mode: Puts the current mode back to its defaults: OKLCH sliders, accent colors, variable overrides, locks, Custom CSS, Canvas FX, Manual Variable Overrides, Gradient Background, Surfaces and the auth page checkboxes. It also resets the Backgrounds tab, which every mode shares, and deletes its uploaded pictures. A confirmation dialog gives you the option to create a backup snapshot first.
  • Global Reset: Resets all 4 modes to factory defaults: OKLCH sliders, accent colors, variable overrides, locks, Custom CSS, Canvas FX, Manual Variable Overrides, Gradient Background and Surfaces, plus the Backgrounds tab and its uploaded pictures. Saved snapshots and preset libraries are kept. A confirmation dialog gives you the option to create a backup snapshot first.
  • Factory Reset: Permanently removes all data: active theme state, saved snapshot library, CSS presets, Canvas presets, Gradient presets, and saved metadata. Its confirmation downloads a backup first unless you untick Export a backup before wiping. The built-in Tactical Liquid Grid Canvas FX preset comes back on the next load. In a personal Themes tab, it removes your personal theme and your library.
  • JSON View: Click the { } JSON button in the header to view the current theme as formatted JSON in a modal. Includes a Collapse/Expand toggle for minified output and a Copy to Clipboard button. If a snapshot is active, the output includes its metadata (name, version, author, description, etc.).
  • Clipboard Import (JSON): Pressing Ctrl+V with theme JSON on your clipboard, while you aren’t typing in a field, opens an import dialog. The tool auto-detects the theme structure, checks for duplicates, and warns about embedded Canvas FX scripts for security review before importing. Import Without Applying adds the theme to your gallery without switching to it. Canvas FX, CSS and gradient preset backups can be pasted the same way.
  • Modal Shortcuts: Escape closes the designer’s dialogs and Enter confirms the primary action. Backspace also cancels most confirmation dialogs when you aren’t typing in a field. An open dialog, and the Documentation panel, holds the keyboard focus: Tab moves only between its own controls, and closing it puts the focus back on the button that opened it, or, after a delete, on the same button of the theme now in its place. Escape or a click outside a JSON editor you typed in asks before it drops your edits.
14. Libraries & Data Management

Theme Designer Pro features isolated libraries for Themes, Custom CSS, Canvas Scripts, and Gradient Presets. Themes save complete snapshots of all 4 modes, including accent colors, locks, CSS, Canvas scripts, Manual Variable Overrides, Gradient Background, Surfaces and the auth page settings.

Theme Gallery

  • Snapshot Coverage: When saving a theme snapshot, all associated data is captured: OKLCH sliders, variable locks & overrides, Manual Variable Overrides, Custom CSS, Canvas FX scripts, Gradient Background, Surfaces, accent colors and the auth page settings, across all 4 modes. The Backgrounds tab belongs to the live theme and isn’t saved in a snapshot. The Manual Variable Overrides switch is saved with the text, and a theme saved before 1.11.0, which has no switch, loads its overrides switched on when it has any. Loading a snapshot locks every variable it overrides.
  • Theme Metadata: When saving a snapshot, you can attach metadata: Name, Description, Author, Theme Version, Target WebUI Version, Repository URL, and a Theme Update URL. Metadata is embedded in exported .json files and preserved through imports, so a shared theme keeps its name, author and update address.
  • Visual Indicators: Hovering over a theme card displays a rich tooltip showing the name, version, author, description, and color-coded feature tags: Custom CSS, Canvas FX, Gradient, Overrides, and Linked (URL-linked themes).
  • Search: Click the 🔍 icon to search themes by name, author, or description. Press Escape to close the search bar.
  • Tag Filter: Click the filter icon to narrow the gallery by feature: show only themes that contain Custom CSS, Canvas FX, Gradient, Overrides, or those that are Linked to an update URL.
  • Sort: Click the sort icon to cycle through Default (newest first), A→Z, or Z→A alphabetical sorting.
  • Card Actions: Hovering a theme card shows ✎ edit details, 💾 overwrite with your current settings, × delete, ↓ export, and ⟳ check for an update when the theme has an Update URL and update checks are on.
  • Applying a Theme: Clicking a theme card opens Apply Library Theme, where you pick the modes to change (all ticked at first) and the parts to apply: OKLCH Palette, Variable Overrides, Custom CSS Snippet, Canvas FX Script, Gradient Background, Surfaces and Auth Page Visibility. A mode the theme doesn’t have is filled from another: OLED from Dark at lightness 0, Her from Light, and any other from Dark, or Light when there’s no Dark. A setting the theme leaves out is applied as its default, and Auth Page Visibility covers only the Show on Auth Pages and Only on Auth Pages switches, not whether the palette is on. With the Auto Sync valve on, the dialog is skipped and the footer’s Sync All switch decides between all four modes and the current one.
  • Manual Editor: The save and edit dialogs have a { } Manual Editor that edits the theme as JSON, with live validation.
  • Import from URL: Click the Import button to open a modal where you can paste a direct URL to a theme JSON file (e.g., a GitHub raw link). The tool fetches it, adds it to your library, and applies it right away, which outside Draft mode means live for every user. If the theme runs a Canvas FX script, it asks first, and the theme stays in your gallery if you say no. You can also import local .json files from the same modal, or drop them onto the designer, with the same check.
  • Duplicate Detection: When importing themes from a file, a URL or the clipboard, the tool checks for duplicates and skips a theme your gallery already has under the same name with the same settings in every mode. A theme that differs in any part Apply Library Theme can apply, including Surfaces, Auth Page Visibility or the palette’s on/off switch, is imported as a new entry.

Preset Galleries

  • Universal Importing: You can click any Import icon, or simply drag and drop .json, .css, or .js files anywhere onto the application. The designer routes each file to its gallery: a .js file to Canvas FX, a .css file to the CSS snippets, a .json gradient preset to the Gradient gallery, and a .json theme, bundle or backup to where its contents belong. An entry that isn’t valid, such as a theme without Dark and Light modes or a preset whose code isn’t text, is skipped, the rest of the file still imports, and the summary says how many were skipped as invalid. A preset without a name is named by its place in the file, such as Animation 2, Snippet 3 or Gradient 4.
  • Search, Sort & Filter: The Canvas FX gallery filters by type (All, WebGL, Context, Follows Theme, DOM Access) and the Gradient gallery by type (Linear, Radial, Mesh), with the same search and sort as the Theme Gallery.
  • Export & Wipe: Each gallery has a download icon to export that collection as a single JSON backup file, and a trash icon to permanently wipe that gallery's contents.
  • Server-Side Sync: All preset libraries (themes, CSS snippets, canvas scripts, gradient presets) are synced to the server half a second after you add, rename, delete, or import presets, as one file. This means your presets survive browser data clears, work across devices, and are included in server backups. The server copy replaces the browser’s copy on every load. While the function is turned off, syncs wait and go through once it’s back on. The server refuses a library larger than 20 MB.
  • Personal Libraries: In a personal Themes tab, the galleries are the user’s own, saved in DATA_DIR/theme/users/<user id>/ and read from {ROUTE_BASE}/me/library.json. Use instance theme keeps them; deleting the account removes them.

CSS Export

  • The CSS button: The CSS button in the header shows the CSS the designer generates for every mode, read-only, and updates it live while it’s open. It’s the way to use a theme without the function, for example as Open WebUI’s custom.css.
  • Minify: The Minify checkbox switches between formatted and minified CSS.
  • Download & Copy: Download saves it as a .css file named after the active theme. Copy sends it to your clipboard.
15. Theme Updates

Theme Designer Pro includes a built-in update system that lets you check for newer versions of themes hosted remotely. This requires a Theme Update URL to be set on a saved snapshot.

Turning Update Checks Off

  • The Enable Theme Update Checks valve (on by default) covers every update request: the Updates button, each theme’s ⟳ check, and the Update badges in Community Themes. Turned off, the button and the ⟳ check are hidden, and the designer makes none of these requests to GitHub or to a theme’s update URL. Community Themes has its own valve.

Setting Up

  • Theme Update URL: When saving or editing a theme snapshot, provide a direct URL to the theme's JSON file (e.g., a GitHub raw link). This URL is where the designer will check for newer versions.
  • Exporting for Updates: Use the Export button (↓) on any snapshot to download a .json file. This exported file includes all metadata (name, version, author, description, updateUrl) and can be hosted anywhere accessible via HTTP.
  • Version Field: Set a version such as 1.2.0 when saving. An update is only offered when the remote version is higher than the local one, compared number by number. A leading v is ignored, and a pre-release such as 1.2.0-beta.1 counts as older than 1.2.0.
  • Valid Updates: The remote file must contain at least a dark and a light mode, or the check reports “Invalid theme format”.

Per-Theme Updates

  • Update Icon (⟳): Snapshots that have a Theme Update URL display a green ⟳ button on hover (right edge of the card). Clicking it fetches the remote JSON and compares versions.
  • Update Modal: When an update is detected, a confirmation modal shows the current version, available version, author, and description from the remote source. ▸ View Changes shows, for each mode, every part that changes (the same parts Apply Library Theme lists), and a warning appears when the update adds or changes a Canvas FX script or custom CSS. Click Update Theme to apply it, Ignore This Update to hide this version, or Cancel.
  • What Gets Updated: The update replaces all mode data (Dark, OLED, Light, Her) and syncs the version, description, author and target version from the remote. Your local theme name and URLs are preserved. If the theme is in use in any mode, the update goes live right away. An update that changes a Canvas FX script or custom CSS asks you to confirm first.
  • Ignored Updates: Ignoring remembers that exact version step for that Update URL, in this browser only. A newer remote version, or a change to your local version, shows the update again.

Global Update Check

  • Updates Button: The Updates button in the header, next to AI, checks all saved snapshots that have a Theme Update URL. It first reads the community manifest.json from GitHub, then fetches any other Update URLs in parallel. It opens a results modal only when it finds updates or errors; otherwise a short message says everything is up to date.
  • Batch Results: The results modal lists available updates, each with Update, ▸ Diff and Ignore, a count of themes already up to date, and any errors (e.g., CORS failures or unreachable URLs). Update All appears for two or more updates and becomes Retry Failed after failures. A banner counts updates that change scripts or CSS.

CORS Requirements

  • The designer uses fetch() to check URLs. The remote server must allow cross-origin requests (Access-Control-Allow-Origin: *). GitHub raw URLs (raw.githubusercontent.com) work out of the box. Custom servers may need CORS headers configured.
  • Every update request, the manifest included, must also pass the Allowed Import Domains valve when it’s set: hosts match without regard to case, subdomains count, and redirects are checked again. GitHub blob, raw and gist links are rewritten to raw URLs first. A response is dropped once it passes 2 MB, and a host that hasn’t answered within 15 seconds, or stops sending for 15 seconds, is listed under errors while the other themes are still checked.
16. Reference: Available Variables

The following variables are dynamically generated and applied to the Open WebUI root.

Variable Name Default Tonal Depth
--color-gray-5098% Lightness
--color-gray-10094% Lightness
--color-gray-20092% Lightness
--color-gray-30085% Lightness
--color-gray-40077% Lightness
--color-gray-50069% Lightness
--color-gray-60051% Lightness
--color-gray-70042% Lightness
--color-gray-80032% Lightness
--color-gray-85027% Lightness
--color-gray-90020% Lightness
--color-gray-95016% Lightness

These are the Dark, Light and Her defaults, at a Lightness slider of 20%. Moving the slider shifts every step by the same amount (step + slider − 20), kept between 0% and 98%. OLED starts at a slider of 0%, so its 900 and 950 steps are 0%, pure black.

Every mode also defines its three accents, for theme CSS: --tdp-accent, --tdp-accent-2 and --tdp-accent-3. Each is the color set under Accent Colors, or the generated oklch(0.74 C H) on Dark and OLED and oklch(0.56 C H) on Light and Her, where H is the hue (then 40° more, and 40° less) and C is four times the palette’s chroma, kept between 0.06 and 0.18, or 0 for a neutral theme or a mode with its palette off.

17. Gradient Backgrounds

The Gradient tab provides a dedicated visual gradient builder for applying CSS gradient backgrounds to your Open WebUI instance. The builder generates all the CSS it needs: the structural transparency rules, the sidebar’s backdrop blur, the chat overlay blending, and the colors of Open WebUI’s sidebar and top fades, so you don’t need to write any CSS yourself. Beside Enabled and Animate, the Show on Auth Pages and Only on Auth Pages checkboxes decide whether the gradient also shows on, or only on, the sign-in page.

Gradient Builder Controls
  • Gradient Type: Choose between Linear (directional), Radial (center-outward), and Mesh (multi-point radial overlay) gradient modes.
  • Color Stops: Add, remove, and reorder color stops with interactive swatches and position sliders. Each stop has a color picker and a position value (0 to 100%).
  • Mesh Gradient: An interactive visual editor lets you place, drag, and color up to 16 color points on a 2D pad. Each point has a configurable spread radius. The tool composites multiple overlapping radial-gradient layers against a customizable background color to simulate a mesh gradient effect. Click to add points, drag to reposition, and double-click to remove (a mesh keeps at least 2 points). With a point selected, the arrow keys move it, Delete or Backspace removes it, and Tab or Shift+Tab moves to the next or previous point; hold Shift with an arrow key to move 5 steps at a time.
  • Radial Options: A center pad sets where a radial gradient starts (arrow keys nudge it, Shift for bigger steps, Home recenters it), with a shape (Ellipse or Circle) and four size options.
  • Quick Actions: Reverse flips the stop order, Distribute spaces the stops evenly, and Transfer Colors copies the current colors to the other gradient types. On a mesh, Reverse mirrors the points through the center and Distribute lays them out on an even grid. A linear or radial gradient takes up to 16 stops, and each stop has a duplicate button beside its remove button.
  • Direction (Linear): A slider controls the gradient angle (0° to 360°). Double-click the label to reset to the default 135°.
  • Color Intensity: A slider scales the overall vibrancy of the gradient (0 to 100%). Double-click to reset to 85%.
  • Animate Gradient: Enable a looping CSS animation that slowly shifts the gradient position. An additional speed slider (2 to 30 seconds, 8 by default) controls the animation duration.
  • Enabled Toggle: Turn the gradient on/off without losing your stop configuration.
  • Show on Auth Pages: Controls whether the gradient appears on Login/Signup screens. Enabled by default. The Enable Auth Page Theming valve hides it and turns it off.
  • Reset / Random: Reset turns the gradient off and returns every gradient setting to its default. Random turns it on with a random type, direction and colors.
  • Saving Your Own: The + button above the preset gallery saves the current gradient as a preset of your own.
How It Works & Conflict Detection

When the gradient is enabled (with at least 2 color stops), the designer automatically generates a Structural Layer that makes all layout containers transparent so the gradient shows through. It also adds a semi-opaque backdrop-blur rule to the sidebar for readability, and overrides the chat overlay for proper blending.

If your Custom CSS Snippet contains a gradient function and a background property, the builder displays a warning banner, even when the two are in different rules. The builder’s gradient is written with !important, so a Custom CSS gradient overrides it when it also uses !important on the same element, because the Custom CSS Snippet comes after the builder’s output. To use the Gradient Builder alone, remove or disable the conflicting rules in your Custom CSS Snippet. The AI button’s confirmation says so too when a gradient it picked won’t show for this reason.

Quick Presets

The builder includes 12 ready-to-use gradient presets. Clicking a preset turns the gradient on and applies its colors, type and direction, sets the intensity to 85% and the animation speed to 8 seconds, and for a mesh preset, places its own points and base color:

Preset Type Colors
MidnightLinear 135°#0f0c29, #302b63, #24243e
EmeraldLinear 135°#0d2818, #04471c, #058c42
AmethystLinear 135°#1a0a2e, #3d1e6d, #6b3fa0
SapphireLinear 135°#041e42, #0c2d5a, #1e40af
AuroraLinear 135° (animated)#0f0c29, #1b5e20, #1a237e, #6a1b9a
SunsetLinear 180°#1a0a2e, #b91c1c, #d97706, #f59e0b
OceanLinear 180°#001219, #005f73, #0a9396
NeonLinear 135°#0d0221, #0d0b52, #6a11cb, #f953c6
NebulaMesh#6366f1, #ec4899, #06b6d4, #8b5cf6
LagoonMesh#0d9488, #22d3ee, #059669, #0284c7
EmberMesh#dc2626, #ea580c, #d97706, #991b1b
ArcticMesh#38bdf8, #22d3ee, #818cf8, #2563eb
Open WebUI Backgrounds

In Open WebUI, each person can set a Chat Background Image in Settings → Interface, and a model or a folder can have a background image of its own, set in the model’s editor or the folder’s Edit Folder dialog. Open WebUI lays the image over the chat with a dimming layer, so it covers this theme’s gradient or Canvas FX. The dimming layer stays while Canvas FX or a gradient runs, so at 100% the image looks as Open WebUI shows it.

The Backgrounds tab lists the Chat Background Image, every model with a background image, and in a personal theme every folder of yours with one. Each row’s Opacity slider sets the opacity of that image and its dimming layer while the theme is in use: at 100% it shows as Open WebUI shows it, at 0% it’s hidden, so the theme’s own background shows in its chats. In between, the theme shows through the image. A folder’s image shows only on that folder’s page, where a new chat in the folder starts, so that is where it fades.

Draw the Canvas FX animation over these images, above the list, decides which is on top. It’s on by default, so picking a Canvas FX script shows the animation over the pictures straight away. Off, the images sit over the theme’s animation and cover more of it the higher their opacity. On, every one of them and its dimming layer moves behind the animation, so the animation stays on top at any opacity. It takes effect only while an animation runs, so it’s grayed out in a mode with no Canvas FX. A gradient can’t have an image behind it: the gradient is the page’s own background, which always sits under everything, so the image stays in front of it either way.

Dimming, under it, sets how much of Open WebUI’s dimming layer covers every one of these images: at 100% it stays as Open WebUI draws it, lower thins it to brighten the pictures, and at 0% they show clear. It combines with each image’s Opacity, so at 50% Opacity and 40% Dimming the image shows at half opacity and its dimming layer at a fifth.

Sign-in page, the last row in the instance designer, gives the sign-in page a picture of its own, which Open WebUI doesn’t offer. Upload picture stores a PNG, JPEG, GIF or WebP of up to 5 MB with the function, which serves it at {ROUTE_BASE}/auth-background to anyone, since nobody is signed in on that page; only an admin can upload or remove it. Use URL takes an https:// address instead. The picture sits under the same dimming layer as Open WebUI’s own background images, so Dimming and Draw the Canvas FX animation over these images apply to it too, and its own Opacity slider fades it into the theme. Only the instance theme can set it, and Enable Auth Page Theming off hides it with the rest of the sign-in theming. Remove, Reset Mode and Global Reset delete an uploaded picture, in Draft mode once you Publish. Uploading needs Live mode, because the upload replaces the published picture at once.

Other pages gives the pages without a chat a picture of their own: Workspace, Notes, Calendar, Automations, Channels, the admin pages and the rest, where Open WebUI draws no background. Use my Chat Background Image (in the instance designer, Use each person’s Chat Background Image) shows the picture each viewer set in Settings > Interface. Upload picture stores a PNG, JPEG, GIF or WebP of up to 5 MB with the function, and Use URL takes an https:// address. The instance theme’s upload is served at {ROUTE_BASE}/page-background to anyone signed in, and only an admin can change it; a personal theme’s is kept in that user’s own folder and served to them alone at {ROUTE_BASE}/me/page-background. The picture sits under the same dimming layer, so Dimming and Draw the Canvas FX animation over these images apply to it, and its Opacity slider fades it into the theme. Those pages’ solid panels clear so the picture shows, as they do under Canvas FX; rounded panels and controls keep their fill. Remove, Reset Mode and Global Reset delete an uploaded one, in Draft mode once you Publish. Uploading needs Live mode, because the upload replaces the published picture at once.

The list belongs to the live theme, not to a gallery theme: applying another theme leaves it as it is, and exported theme files don’t carry it. Reset Mode and Global Reset put every setting in the tab back to its default, in every mode, since the tab has one set of settings for all of them. The instance theme sets models’ images, and each person’s own Chat Background Image, for everyone using it. Folders belong to each person, so only a personal theme sets theirs. A Chat Background Image changed in Settings, or a model’s changed in its editor, fades at once, with no page load. A tab still showing the old image keeps it faded until it reloads.

Advanced: For more complex gradient setups beyond what the builder offers, you can also write gradient CSS manually in the Style Overrides tab using Custom CSS. Because Custom CSS comes after the builder’s output, a Custom CSS background-image with !important on the same element replaces the builder’s gradient rather than layering with it.

18. Structural Transparency & Layer Stack

When you enable a Canvas FX animation or a Gradient Background, the designer automatically generates a set of CSS rules called the Structural Layer. This layer makes the native Open WebUI UI panels transparent so the background effect shines through, while intelligently preserving opaque backgrounds on overlay UI elements (dropdown menus, modals, dialogs) for text readability.

The 7 Rendering Layers (Back to Front)

When Canvas FX and/or Gradient Background are active, the final visual output is composed of 7 distinct layers stacked using CSS z-index and position: fixed:

Layer z-index What It Does
1. Body BackgroundnoneThe body element's background-color (your OKLCH palette's base gray) and, if gradient is active, the background-image gradient.
2. Background Color Div-2A full-viewport <div id="owui-theme-bg-color"> inserted behind everything. It’s created only while Canvas FX runs, and the structural layer makes it transparent so the canvas shows through.
3. Pictures-1The Backgrounds tab’s Other pages picture, on a fixed layer behind the app, and Open WebUI’s own background images with their dimming layer, which move under the canvas while Draw the Canvas FX animation over these images is on.
4. Canvas Element0A full-viewport <canvas id="owui-theme-canvas-bg"> where your Canvas FX animation renders. Has pointer-events: none so it never intercepts clicks.
5. Structural TransparencynoneCSS rules that set background-color: transparent on .app, .app > div, main, nav, sticky bars, the designer’s and the sign-in page’s containers, wrappers painted with a gradient class (apart from the sidebar fades, the top fade and the chat background’s dimming layer), and layout wrappers whose classes begin with bg-gray-, bg-base-, dark:bg-gray- or dark:bg-base- (not hover or other variants). Interactive elements (button, a, input, select, label, span), your own message bubble, rounded controls such as the message input and pill buttons, everything inside the message input, and the login card are excluded, so they keep Open WebUI’s own look. The rules use !important and are scoped to the mode’s selector plus .app, so overriding one takes !important and at least that specificity. See Overlay UI Protection below for how portaled overlay UI stays opaque.
6. Glass PanelsnoneA semi-opaque overlay with backdrop-filter: blur() on the sidebar, keeping navigation readable while letting the background show through. The Gradient Builder auto-calculates the RGBA value from the darkest gradient stop (or the mesh background color for Mesh gradients). The sidebar’s glass behavior is controlled by the Sidebar Transparency valve: opaque (default) uses a solid background, except that with a gradient active the sidebar takes the darkest gradient color at 75% opacity with a 12px blur, translucent applies a tinted glass effect with backdrop-filter: blur(20px) saturate(1.3), and transparent removes the background entirely (auto-upgraded to translucent on mobile for readability). Open WebUI’s fades at the top and bottom of the sidebar follow the same valve: they stay while it’s opaque, in the gradient’s sidebar color while a gradient is active, and go away with translucent or transparent, where they would read as solid bands. Both sidebar and overlay transparency valves work independently of Canvas FX and gradient state. In a mode with its Surfaces switch on, the Surfaces rows set the sidebar and overlays instead of these valves.
7. Overlay GlassnonePortaled UI elements (settings modal, dropdown menus, user menus, integration menus) that live outside .app on <body>. Controlled by the Overlay Transparency valve: opaque (default) keeps solid backgrounds for readability, translucent applies frosted glass with backdrop-filter: blur(20px) saturate(1.3). Uses CSS :not(.app *) exclusions to avoid affecting elements inside the main app container. translucent also hides the fade at the top of chats.
Overlay UI Protection

Dropdown menus, modal dialogs, and listbox selectors are portaled outside the .app wrapper: they are appended directly to <body>. To ensure these remain readable against canvas/gradient backgrounds, the structural layer uses a multi-pronged strategy:

  • Low-specificity transparency: The broad bg-gray- and bg-base- transparency rule is wrapped in CSS :where(), so it adds nothing to the specificity beyond the mode selector and .app. Its declarations are !important, though, so only an !important rule of equal or higher specificity overrides them.
  • Element exclusions: Interactive elements like button, a, input, select, label, and span are excluded from transparency entirely via :not() filters, and so is anything with a rounded class, the message input and everything inside it. This protects toggle knobs (bg-white circles), styled buttons, the message input’s own tint and other small UI widgets: they hide almost none of the background, so clearing them only changed their look. Dropdown menus, modal dialogs, and listbox selectors, which are portaled outside the .app wrapper, are naturally unaffected because the transparency rules only target elements within .app, #theme-designer-container, and #auth-page scope.
  • Sidebar backdrop: Nested bg-gray-* and bg-base-* elements inside #sidebar become transparent like the rest of the app, but stay readable because the sidebar itself keeps its own background: --color-gray-950 in Dark and OLED, --color-gray-50 in Light and Her, or the darkest gradient color at 75% opacity with a blur while a gradient is active. The Sidebar Transparency valve controls that backdrop: opaque (the default) keeps it as described, while translucent and transparent swap it for a frosted-glass or fully see-through backdrop so Canvas FX and gradient backgrounds show through.
  • Overlay translucency: Portaled overlay elements (settings modal, dropdown menus, user menus) can optionally use a frosted glass effect via the Overlay Transparency valve. When set to translucent, the system appends CSS rules targeting div[class*="bg-gray-"], div[class*="bg-base-"] and div[class*="bg-white"] elements inside portals using color-mix() and backdrop-filter. Elements inside .app and #theme-designer-container are explicitly excluded via :not(.app *) to prevent regressions in the main UI. When the designer is open in the Themes tab of Settings, its own page turns clear too, so the glass shows behind it, as long as the designer’s light or dark look matches Open WebUI’s. Editing the other mode keeps the page solid so its text stays readable.

Note: The [class*="bg-white"] attribute selector is intentionally not included in the structural transparency rules. Elements with bg-white classes in Open WebUI are almost always interactive widgets (toggle indicators, button styling, card backgrounds), not structural layout wrappers. However, it is included in the overlay translucency rules since overlay panels in light mode use bg-white as their primary background class.

What Triggers the Structural Layer?

The structural transparency rules are only emitted when at least one of the following is true for the active mode:

  • Canvas FX is enabled and has a non-empty script, or
  • Gradient Background is enabled and has at least 2 color stops (or 2 mesh points for Mesh gradients).

If neither is active, the structural rules are just opaque background-color rules for body and #sidebar, and textareas keep Open WebUI's native styling (recolored by the palette variables) so intentionally transparent fields are left alone. The Surfaces tab and an Other pages picture can still make layers see-through without either.

The see-through rules apply only where their background shows. On a sign-in page with the background's Show on Auth Pages off, and on the other pages with its Only on Auth Pages on, Open WebUI's panels keep their fill. With the Enable Canvas FX valve off, so do the panels of a mode whose only background is Canvas FX; a gradient beside it keeps them see-through. The Surfaces rules stay either way.

What Can Conflict with Transparency?
  • Custom CSS setting opaque backgrounds: If your Custom CSS Snippet sets background-color on .app, main, or other layout containers, it can override the structural transparency and block the background effect from showing through. To fix this, set those backgrounds to transparent in your Custom CSS.
  • Open WebUI updates: If Open WebUI changes its class names or DOM structure (e.g., renaming .app to something else), the structural layer selectors may stop matching. This can cause panels to revert to opaque backgrounds, hiding the canvas or gradient behind them.
  • Canvas FX + Gradient coexistence: Both features share the same structural layer. When both are active simultaneously, the canvas animation renders on top of the gradient background. The gradient sits on body (layer 1), while the canvas renders at z-index 0 (layer 4). The canvas has a transparent background by default, so the gradient may partially show through depending on what your canvas script draws.
  • Third-party extensions or custom elements: Elements inside .app using bg-gray-* or bg-base-* classes will be made transparent, unless they are a button, a, input, select, label or span, have a rounded class, or sit inside the message input or your own message bubble. If a third-party extension injects custom UI with gray backgrounds, it may become transparent. Use the Style Overrides tab to restore specific elements if needed.
Surfaces: Each Layer's Opacity and Blur

The Surfaces tab sets, per mode, how see-through each layer over the background is. Opacity is how much of the color Open WebUI paints that layer covers it, from 0% (clear) to 100% (solid). Blur softens whatever shows through it, up to 40px. For the backdrop behind a dialog, the first slider is how dark it gets. Double-click a slider’s label to reset it to its default.

  • Sidebar: the open sidebar; its top and bottom fades show only at 100%
  • Message input: #message-input-container
  • Tabs drawer: the drawer tabs open in below 768px wide (#controls-container). From 768px each tab, alone or in a split view, looks like the page or chat it shows: a new chat, Files, a file, a terminal, Notes, the calendar or workspace
  • Cards and panels: the rounded panels on a page, such as note cards, the calendar and workspace and admin cards; at 100% and no blur they keep Open WebUI's own look
  • Buttons: the grey buttons on a page, such as Create, single or split; switches and the black and white action buttons, such as Save, keep their fill, including the ones drawn with grey classes
  • Menus and tooltips: every dropdown and submenu, the model picker, Model controls, tooltips and toasts
  • Dialogs and Behind dialogs: the window itself and the page behind it
  • Top fade: the fade at the top of a chat; 0% hides it

With the tab's switch off, a mode follows the Sidebar Transparency and Overlay Transparency valves. On, the mode's own values win over both. Turning it on the first time starts from what those valves draw. Surfaces travel with the theme: they export, sync between modes under their own Sync category, and Reset Mode clears them.

CSS Output Order

Understanding the injection order helps debug cascade conflicts. The final CSS is assembled in this order:

  1. OKLCH Variable Declarations: --color-gray-* palette ramps and --tdp-accent* accents per mode
  2. Manual Variable Overrides: user-defined CSS custom properties (injected after palette for priority)
  3. Structural Background Rules: when Canvas FX or a gradient is active, transparency rules on the app containers plus body/#sidebar backdrops; otherwise just opaque body/#sidebar rules. The Surfaces rules follow them when the mode’s Surfaces switch is on.
  4. Gradient Background CSS: background-image, sidebar blur, and chat overlay rules
  5. Custom CSS Snippet: your raw CSS
  6. Valve rules: the Sidebar Transparency valve rewrites the sidebar’s own rules in place, then appends a rule hiding the sidebar fades (translucent or transparent) and the mobile fix (transparent only). Overlay Transparency translucent appends the overlay glass and hides the top fade. All of these come after Custom CSS.

A later rule wins a tie of equal specificity and importance. Many of the designer’s own rules use !important, so a Custom CSS rule needs !important too to override them, as with a gradient background-image over the Gradient Builder’s.

Structured sections: Internally the CSS is generated as four separate sections: vars (palette + manual overrides), structural, gradient, and custom. They are saved to the server both as the flat blob above (served at /theme.css and shown by the header’s CSS button) and as a sections JSON file. Consumers assemble only the sections they need: the bootloader picks sections per the "Show on Auth Pages" toggles (delivered inside state.json under the _cssSections key, plus an extra section holding valve-appended rules that are never auth-gated), and the server composes only vars + custom into /static/custom.css as the flash-free safe subset, plus the overlay glass rules when Overlay Transparency is translucent. The /*[OWUI_*]*/ marker comments still appear in the flat output and remain the fallback slicing mechanism for themes saved by older versions.

19. Keyboard Shortcuts & Editor Tips

A consolidated reference of all keyboard shortcuts available throughout the designer.

Shortcut Action
Ctrl+ZUndo last change (Cmd on macOS; not while typing in a field)
Ctrl+Y / Ctrl+Shift+ZRedo last undone change
Ctrl+V (image)Extract palette colors from a clipboard image (not while typing in a field)
Ctrl+V (JSON)Import a theme, or a Canvas FX, CSS or gradient preset backup, from clipboard JSON (not while typing in a field)
EscapeClose an open dialog or search bar
EnterConfirm the primary action in a dialog, when the focus isn’t in a text field or on a button; in an Import dialog’s URL field, Enter loads the URL
BackspaceCancel most confirmation dialogs, when you aren’t typing in a field
Ctrl+EnterCreate the theme in the AI Consultant form (Cmd+Enter on macOS)
Arrow keys, Home, EndWith a tab focused: open the next or previous tab, or the first or last
TabIn a gallery, reaches each card (Enter or Space applies it, as a click does) and then the card’s own buttons (Edit, Overwrite, Delete, Export); a card’s buttons show while one of them has keyboard focus. A toolbar’s search box is in the Tab order only while it is open, and a button’s tooltip shows while it has keyboard focus
Arrow keys, HomeMove the radial gradient’s center (Shift for bigger steps); Home recenters it
Arrow keys, Delete, TabWith the mesh pad focused: move the selected point (Shift for 5 steps), remove it with Delete or Backspace (a mesh keeps 2 points), or switch points with Tab and Shift+Tab, which leave the pad after the last point or before the first
Double-click slider labelReset the Hue, Chroma, Lightness, Gradient Direction, Color Intensity, Animation Speed or a Surfaces slider to its default; on the Accent Colors label, set all three accents back to automatic
Double-click on a gradient padOn the radial pad, recenter it; on a mesh point, remove it
EscapeClose the Documentation panel

Code Editor Shortcuts

These apply inside the Custom CSS, Canvas FX, and Manual Overrides editors:

Key Behavior
TabInserts a 2-space indent while tab trap is active (default on). Press Escape to toggle.
EnterAuto-indents the new line to match the previous line's indentation
{Auto-inserts closing }, and the same for (, [, ", and '
Enter after {Indents the new line by two more spaces; if no } follows the cursor, also adds a closing } on its own line below
EscapeToggles tab trap mode; when off, Tab moves focus instead of inserting spaces
20. Community Presets

Import any preset directly into Theme Designer Pro using the built-in Import button, URL import, or drag-and-drop.

🎭 Built-in Community Themes Browser

The Themes area includes a curated Community Themes grid, fetched from the presets repository’s docs/catalog.json on GitHub. Each card shows the theme’s preview colors and metadata with a one-click Install button, which adds the theme to your Theme Gallery; installed themes are marked. When Enable Theme Update Checks is on, the grid also reads manifest.json and a card offers an update if the remote version is newer than your installed copy. An Install All button appears when at least one theme isn’t installed, alongside Refresh, search (name, description, author) and a sort that cycles A to Z, Z to A and the catalog’s order. The Enable Community Themes valve hides the whole browser and skips its catalog fetch. If you set Allowed Import Domains, include raw.githubusercontent.com, or the grid shows “Could not load community themes.”

🔗 Install Links From the Website

Every preset in the preset gallery, and every theme made in its Studio, has an Install on my Open WebUI button. After a visitor tells the site their Open WebUI address once, the button opens this designer with an address ending in #tdp-import=. A preset opens its own Import dialog with its address filled in, and you choose Load URL, so Enable URL Import and Allowed Import Domains apply as they do to an address typed in by hand. A Studio theme travels inside the link and is offered the way a pasted theme is, with the Canvas FX warning when it has a script. Anyone can write such a link, a chat model included, so what it brings, in the link or from the address it fills in, gets the check a chat theme gets: custom CSS, Manual Overrides or a CSS snippet that fetches is refused with a message saying why. Nothing installs until you confirm, the link leaves the address bar once read, and a preset type whose valve is off is refused.

🚀 Quick Start: Import Everything at Once

Open the Import modal in the Themes tab, paste this URL, and click Load URL; all Canvas FX animations, themes and gradients are imported in one shot. The Import modals in the Style Overrides, Canvas FX and Gradient tabs take only their own type.

https://raw.githubusercontent.com/silentoplayz/theme-designer-pro-presets/main/bundles/everything.json
📦 Import by Category

Prefer to import only specific types? Use these individual bundle URLs:

🎨 Themes
https://raw.githubusercontent.com/silentoplayz/theme-designer-pro-presets/main/bundles/themes-all.json
✨ Canvas FX
https://raw.githubusercontent.com/silentoplayz/theme-designer-pro-presets/main/bundles/canvas-fx-all.json
🌈 Gradients
https://raw.githubusercontent.com/silentoplayz/theme-designer-pro-presets/main/bundles/gradients-all.json
🔗 Resources
  • Preset Gallery: Visit silentoplayz.github.io/theme-designer-pro-presets/gallery to browse, preview, and copy import URLs for curated presets.
  • Submit Your Own: Share your creations with the community! Open a Theme Submission on GitHub to contribute your theme to the gallery.
  • Source Repository: github.com/silentoplayz/theme-designer-pro-presets
21. Reverse Proxy Configuration

If Open WebUI is behind a reverse proxy (nginx, Caddy, Apache, Traefik, etc.), the live updates at {ROUTE_BASE}/events need to stream through it. The function sends X-Accel-Buffering: no with them, so stock nginx streams them even with buffering on. Turn buffering off anyway if your proxy or CDN ignores that header, or if proxy_ignore_headers removes it: otherwise open pages only see a theme change after a reload. The theme itself, theme.css and state.json, loads fine either way.

Two more settings matter. Picture uploads are up to 5 MB and theme saves up to 64 MB, so raise nginx’s client_max_body_size (1 MB by default), for example to 64m, or larger saves fail with 413. A proxy that only passes certain paths must pass everything under {ROUTE_BASE} (the designer, saves, /events, /events/bind, /theme.css, /state.json, /library.json, /consult, /me and its routes, /auth-background and /page-background) plus /static/loader.js and /static/custom.css.

The proxy must also forward the host the browser asked for. Saves, picture uploads, /consult and /events/bind refuse a request sent by a page on another origin. Over plain HTTP, browsers don’t say where a request came from, so the check compares the page’s host with the Host header the proxy forwards (the port may differ). Keep proxy_set_header Host $host; as below, since nginx otherwise forwards its upstream’s address, or set Open WebUI’s WEBUI_URL to the address people open. Without either, those requests answer 403 “Changes must come from Open WebUI’s own pages”.

⚠️ Why This Matters

Theme Designer Pro uses three delivery layers to push themes to every page (the instance theme to everyone without a personal theme, a personal theme to its owner’s pages):

  • Server-Sent Events (SSE): live push to connected browsers via {ROUTE_BASE}/events
  • HTTP fetch: the bootloader fetches {ROUTE_BASE}/theme.css and {ROUTE_BASE}/state.json on every page load
  • Static-asset composition: theme CSS served as a render-blocking stylesheet for instant first paint

Reverse proxies that buffer responses (the default for nginx) can hold SSE events in memory instead of passing them on. Other users and devices then see a theme change only after they reload the page.

nginx

Add proxy_buffering off; to your Open WebUI location block:

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # REQUIRED for SSE streaming (theme live push, chat streaming)
    proxy_buffering off;
}

Then run: sudo nginx -t && sudo systemctl reload nginx

Caddy

Caddy disables response buffering by default, so it needs no extra configuration. If you have explicitly enabled buffering, disable it:

your-domain.com {
    reverse_proxy localhost:8080 {
        flush_interval -1
    }
}
Apache

Disable output buffering for the Open WebUI proxy:

# flushpackets=on passes each SSE event on as it arrives
ProxyPass / http://127.0.0.1:8080/ flushpackets=on
ProxyPassReverse / http://127.0.0.1:8080/
Traefik

Ensure response buffering middleware is not applied to the Open WebUI service. Traefik streams by default, but if you've added a buffering middleware, remove it for the Open WebUI router.

🔍 Diagnostic Checklist

If themes aren't propagating to other users/devices:

  • Step 1: On the non-working device, navigate directly to https://your-instance{ROUTE_BASE}/theme.css. If it returns CSS content, the server is working and the issue is in the delivery layer (proxy buffering or missing bootloader).
  • Step 2: On the non-working device, open /static/loader.js directly and search for owui-theme-designer-pro:start. If it’s missing, this worker has not published its fragment yet (send a chat message to trigger event()).
  • Step 3: In DevTools → Network tab, check that the request to {ROUTE_BASE}/events stays open (pending). If it fails or closes right away, your proxy is likely buffering or blocking SSE.
22. Multi-Worker Deployments

If you run Open WebUI with multiple Uvicorn workers (UVICORN_WORKERS > 1), be aware of this SSE limitation:

  • Live push is worker-local. SSE client connections are held in process memory. A theme save handled by Worker A will only broadcast to clients connected to Worker A. Clients on Workers B/C/D will not receive live push events.
  • Page-load fetch still works. The bootloader fetches {ROUTE_BASE}/theme.css and {ROUTE_BASE}/state.json from disk on every page load, which works correctly across all workers. Themes propagate on the next page load/refresh.
  • Redis fixes this. If REDIS_URL is set in your environment (which Open WebUI already uses for WebSocket relay), Theme Designer Pro automatically uses Redis pub/sub to broadcast SSE events across all workers. No additional configuration is needed beyond setting REDIS_URL. The value must be the URL itself. In a Docker Compose environment: list, write - REDIS_URL=redis://redis:6379/0 without quotes, because quotes there become part of the value. The mapping form, REDIS_URL: "redis://redis:6379/0", works too, because YAML removes those quotes. When REDIS_URL doesn’t start with redis://, rediss:// or unix://, Theme Designer Pro logs one warning saying so and keeps live push within each worker. A quoted WEBSOCKET_MANAGER="redis" turns off Open WebUI’s own Redis relay the same way.
  • Channels. Theme updates travel on {REDIS_KEY_PREFIX}:theme_pro_sse, and code and on/off changes on {REDIS_KEY_PREFIX}:live-reload:function_<function id>, for example open-webui:live-reload:function_theme_designer_pro. Redis channels ignore the database number, so two Open WebUI instances on one Redis server need different REDIS_KEY_PREFIX values to stay apart. Both use Open WebUI’s own Redis connection, so they work wherever Open WebUI’s Redis does, Redis Sentinel (REDIS_SENTINEL_HOSTS) and Redis Cluster (REDIS_CLUSTER) included. Without Redis, a personal theme’s live updates can miss a page whose live connection and sign-in claim land on different workers; that page still gets the theme on its next load.
  • A worker that loses Redis catches up when it reconnects. Redis keeps nothing for a worker that is away, and a connection that dies without notice is only noticed after 90 seconds of silence. When the worker reconnects, it tells its open pages and designers what is saved now. A page whose theme, instance or personal, is current skips the fetch, and the others fetch over the usual two-second spread. A designer reloads only when the theme or its galleries changed while the worker was away, as it does for a save in another tab.
  • Turning the function off or on, saving new code, and changing valves reach every worker too. With Redis, each worker hears about the change and loads it within a few seconds. A worker still running a version older than 1.8.2, or one that started while the function was off, catches up the next time it handles any event.
  • The composed assets are per worker. Each worker builds its own /static/loader.js and /static/custom.css from what it has loaded, so a worker only serves the theme once it has run this function at least once. Open WebUI publishes system.startup.completed in every worker's lifespan, so in practice all of them publish during boot.

TL;DR: Single-worker deployments (the default) work perfectly. Multi-worker deployments get live push across workers automatically if REDIS_URL is set; otherwise, themes propagate on page refresh.

23. Sharing loader.js and custom.css With Other Plugins

Open WebUI loads exactly two admin-extensible assets on every page: /static/loader.js (the only hook that runs before the SvelteKit bundle hydrates) and /static/custom.css (a render-blocking stylesheet). Any plugin that wants to reach the page before it paints needs one of them, and neither can have a single owner.

Since version 1.7.0, Theme Designer Pro no longer writes into index.html. It publishes a fragment into a shared registry on app.state, and a route composes every registered plugin's fragment into the response per request. What follows from this:

  • Order does not matter. A plugin that loads after this one needs no cooperation from it, and vice versa. Fragments are composed fresh on every request, not written once at install.
  • Your own edits to those files survive. If you have hand-written content in static/custom.css or static/loader.js, it is served first, followed by each plugin's fragment. The file on disk is never changed: when it’s served, any block wrapped in a registered plugin’s markers is left out and the rest is served as written. A symlinked file is ignored rather than served.
  • Cascade position is explicit. Fragments compose in (order, key) order, and this plugin registers at order=100 so its custom CSS keeps the last word, as documented in Section 18. A plugin at a lower order composes earlier and loses ties at equal specificity.
  • A broken plugin cannot blank the page. If another plugin's fragment raises while composing, it is skipped and logged; every other fragment still ships.
  • Nothing persists on disk. Disabling the function withdraws its CSS immediately and leaves its bootloader inactive. A deleted function never receives its own deletion, because Open WebUI dispatches the event after the row is gone and only to active functions. So what it had published keeps serving until the container restarts: the inactive bootloader if you disabled it first, the whole theme if you didn’t. The exception is another installed plugin that shares this registry: when it handles the deletion, it removes the fragments on the worker that handles it and turns them off on the others. Disable, then delete, so the theme is gone at once.

Upgrading from 1.6.2 or earlier removes the old index.html blocks automatically on the first event. See Section 25 if you want to verify by hand.

24. Troubleshooting & FAQ

Common issues and their solutions.

  • Read-only filesystem. No longer an issue: the bootloader and theme CSS are composed in memory and served from a route, so the function never needs write access to the frontend build directory. The one exception is the one-shot cleanup of a legacy index.html injection left by versions up to 1.6.2, which logs a warning and moves on if the file is not writable.
  • Canvas FX animations are lagging. Heavy mathematically complex animations can drain resources. Ensure your browser supports OffscreenCanvas (indicated by the green Background Worker badge in the designer UI). Note: the badge is a pre-launch prediction (browser capability plus a static scan of the script source), so a script that only fails at runtime still falls back to the main thread without the badge changing. If your script runs on the main thread, keep animations simple. Even with Web Workers, massive particle counts or heavy calculations can still consume significant CPU/GPU resources.
  • My theme doesn't apply to other users. Check first that you published it: a Draft never leaves the designer. A proxy that blocks some of the function’s paths is the other common cause; see Section 21. The bootloader serves the theme to all users on page load from {ROUTE_BASE}/theme.css. If the theme files are missing from DATA_DIR/theme/, the bootloader has nothing to serve. Verify the endpoint works by navigating directly to {ROUTE_BASE}/theme.css in your browser; it should return CSS content. A user with a personal theme sees theirs instead of the instance theme: Use instance theme in their Themes tab puts them back, and turning Allow Personal Themes off puts everyone back without deleting anything.
  • Theme changes aren't appearing live on other devices/browsers. A reverse proxy that buffers the live updates is the usual cause. See Section 21 for the fix. The function sends X-Accel-Buffering: no, which nginx honors unless proxy_ignore_headers removes it; proxy_buffering off also covers proxies and CDNs that ignore the header. Quick diagnostic: open DevTools → Network tab on the non-working device and check that the request to {ROUTE_BASE}/events stays open (pending).
  • Theme reverts after disabling the function. Toggling the function OFF triggers the function.disable_started lifecycle event, which broadcasts a theme-disable SSE event to strip the theme from all clients. The CSS fragment is withdrawn from /static/custom.css at the same time, while the loader fragment stays published in an inactive state so its SSE connection survives. When re-enabled, the function.enable_started event republishes everything automatically. While the function is off, the designer, saves, the library, the AI Consultant and picture uploads answer 503 “Theme Designer Pro is currently disabled”, while theme.css and state.json answer empty and the live connection stays open.
  • Function toggle cleanup details. The theme-disable SSE event removes 7 injected DOM elements by ID: owui-dev-live-theme (main CSS), owui-server-theme (server-injected CSS), owui-theme-style (legacy), owui-theme-canvas-bg (canvas), owui-theme-bg-color (background div), owui-canvas-script-runner (canvas script), and owui-tdp-hidden-bg (the Backgrounds tab’s rules). It also clears the in-memory theme state, the localStorage cache, and this browser’s copy of a personal theme, then reloads /static/custom.css so the palette drops out. A Global Reset sends the same event marked as a reset, and pages then fetch whatever theme is left (a personal theme, or none) over the usual two-second spread instead of stripping it.
  • Live push stopped working after re-saving the function. This should not happen: SSE connections are kept on app.state and survive function hot-reloads. If you do experience this, check that the SSE endpoint is reachable at {ROUTE_BASE}/events. The server sends a heartbeat every 15 seconds. After a dropped connection, the page reconnects in about 3 seconds; after an HTTP error, such as a proxy’s 502, it waits longer each time, up to about 90 seconds.
  • Draft mode keeps the live theme to itself. Theme CSS and state use sessionStorage (tab-scoped), syncToServer() is gated off, and mode changes (Dark/Light/System/etc.) apply only to the designer page’s <html> element, so other tabs and the admin’s live session aren’t affected. Gallery and preset changes still sync to the server library.
  • The AI Consultant says “The model could not answer”. The model is asked as the signed-in person, so a user needs access to the model in the Ai Consultant Model valve, or to the task model, just as they do for chat titles. “No model to ask” means the valve names a model that isn’t available, or the valve is empty and no task model is set. “Wait a few seconds between requests” appears for requests less than 3 seconds apart. “Access denied” means a non-admin tried it while Allow Personal Themes is off.
  • The Launcher Tool’s card can’t apply, or a note shows instead of the designer. Everyone who uses it needs Settings > Interface > iframe Sandbox Allow Same Origin on in their own settings. Without it, the chat’s frame has no origin of its own, so the designer gets no sign-in. With it on, HTML that tools and models show in chats runs with the page’s access, so turn it on only on an instance whose tools you trust. If the frame says personal themes are turned off, the admin needs to turn on Allow Personal Themes.
  • Turning the function off does nothing on a recent Open WebUI. Since v0.12.0, Open WebUI names each function’s module function_<id>_<32 hex characters>. Versions of Theme Designer Pro before 1.9.1 read their ID from that name, so they never recognized their own disable event; update to the current version.
  • Designer URL valve set to a path without /api/v1/. The designer auto-corrects URLs that don't start with /api/v1/ to prevent the SPA catch-all from intercepting the route. A warning is logged when auto-correction occurs. Check your Open WebUI logs for [Theme Pro] messages.
25. Uninstallation & Complete Removal

Toggling the function OFF in the admin panel automatically withdraws the theme CSS from /static/custom.css, marks the bootloader inactive, and broadcasts a cleanup event to all connected clients. In most cases, no manual removal is needed. However, if the cleanup didn't complete (e.g., the server crashed mid-toggle), follow these steps for a complete manual removal:

Step 1: Purge Browser LocalStorage

With the function on, the Factory Reset button in the Danger Zone section below wipes the instance theme, the library and this browser’s main keys. To remove every key, personal and Launcher ones included, or once the function is off, open your Open WebUI instance, press F12 to open Developer Tools, go to the Console tab, and paste:

['owui_dev_theme_v1', 'owui_dev_theme_v1_css',
 'owui_theme_snapshots',
 'owui_canvas_presets', 'owui_css_presets', 'owui_gradient_presets',
 'owui_canvas_last_mode', 'owui_canvas_last_script',
 'owui_theme_last_metadata', 'owui_theme_valve_no_canvas', 'ignored_updates',
 // the model and chat background addresses the theme looked up
 'owui_tdp_model_bg', 'owui_tdp_chat_bg',
 // personal themes, and the legacy Tool's theme kept aside
 'owui_tdp_personal_css', 'owui_tdp_personal_state', 'owui_tdp_personal_uid',
 'owui_tdp_seen', 'owui_tdp_tool_state', 'owui_tdp_tool_css', 'owui_tdp_tool_dismissed',
 // the personal designer's own copies
 'owui_tdp_me_theme_v1', 'owui_tdp_me_theme_v1_css', 'owui_tdp_me_snapshots',
 'owui_tdp_me_canvas_presets', 'owui_tdp_me_css_presets', 'owui_tdp_me_gradient_presets',
 'owui_tdp_me_last_metadata', 'owui_tdp_me_canvas_last_mode', 'owui_tdp_me_canvas_last_script'
].forEach(k => {
  localStorage.removeItem(k); console.log('Purged: ' + k);
});
// this tab's drafts, open tab and Launcher bookkeeping
Object.keys(sessionStorage).filter(k => k.startsWith('owui_')).forEach(k => sessionStorage.removeItem(k));
location.reload();

Step 2: Remove Server-Side Theme Files

Delete the whole DATA_DIR/theme/ folder from the server’s data directory. It holds:

  • open_theme_designer.css, open_theme_designer.json, open_theme_designer_sections.json and open_theme_designer_library.json: the instance theme and library
  • auth_background and page_background: the uploaded sign-in page and Other pages pictures
  • users/: one folder per account with a personal theme, library or Other pages picture, named by the user’s id
  • .save.lock: the lock that keeps two workers from saving at once
  • .index.lock: the lock for the check, run once per start, that removes index.html blocks left by 1.6.2 or earlier

Step 3: Remove the Server Bootloader

  • The Docker Way (Simplest): Restart your container. Fragments live in process memory, and a deleted function leaves its fragments there, turned off first or not, unless another installed plugin that shares the registry removed them on the worker that handled the deletion (on the others it only turns them off), so a restart is what clears them.
  • Upgrading from 1.6.2 or earlier: Older versions wrote directly into index.html. Since 1.7.0, a check run once each time Open WebUI starts removes those blocks automatically. To check by hand, look in the frontend build’s index.html (/app/build/index.html in Docker) for <!-- OWUI Theme Pro Bootloader -->, <style id="owui-server-theme"> and <script type="application/json" id="owui-theme-state">; all three should be gone.

Step 4: Turn Off, Then Remove the Event Function

In the Open WebUI admin panel, navigate to Functions and turn the Theme Designer Pro event function off first, then delete it. Turning it off strips the theme from every page and withdraws its CSS, but its bootloader stays in /static/loader.js, inactive, with its live connection. A function deleted while on keeps serving its whole theme, bootloader and CSS alike. Either way that lasts until the server restarts (Step 3), because Open WebUI tells a function nothing about its own deletion, unless another installed plugin that shares the registry handles the deletion: it removes the fragments on the worker that handles it and turns them off on the others. If you installed the Theme Designer Pro Launcher, delete it from Workspace > Tools too. The function keeps nothing in Open WebUI’s database besides its own row in the function list, which deleting it removes.

26. Portability & Backups

Export your theme gallery snapshots, custom CSS presets, canvas animation scripts, and gradient presets to separate portable backup files at once, and restore them anytime with the import features in their tabs. The live theme is included only if you’ve saved it as a snapshot, and valves aren’t included. In a personal Themes tab, this exports your own library. For a full server backup, copy the DATA_DIR/theme/ folder, including users/; it’s also the only backup of uploaded pictures, which exports don’t carry. Each backup file wraps its items in one key: themes, css_presets, canvas_presets or gradient_presets, and the theme format is described in the presets repository’s schemas/theme-format.md. An imported file or bundle can be up to 16 MB, and a save to the server up to 64 MB, with the theme’s CSS, its state and its sections up to 5 MB each.

27. Compliance & Legal Disclaimer

Theme Designer Pro is an event function provided for educational and customization purposes. By using this function, you acknowledge and agree to the following:

  • Compliance Responsibility: As of Open WebUI v0.6.6+, the software license strictly prohibits altering, removing, obscuring, or replacing any "Open WebUI" branding (including the name, logo, or distinguishing visual identifiers) in deployments where more than 50 people have direct access within any rolling 30-day period, unless you have the copyright holder’s written permission or an enterprise license.
  • Administrative Burden: The responsibility to ensure compliance with the Open WebUI License rests entirely with the server administrator. While modifying color palettes is permitted, you must ensure that your use of the designer (specifically the Style Overrides tab) is not used to hide, obscure, or alter the Open WebUI logo and branding in violation of the license.
  • Liability Waiver: The author of Theme Designer Pro (@G30) shall not be held liable for any material breach of license, legal action, or service termination resulting from the use or misuse of this function on a hosted or distributed Open WebUI instance.
  • Exceptions: The license allows branding changes in a deployment where 50 or fewer people have direct access in any rolling 30-day period, or with the copyright holder’s written permission, or with an enterprise license.

This function is provided "as is" without warranty of any kind. By using Theme Designer Pro, you acknowledge that serving instance-wide CSS and JavaScript may have security implications. Use only on trusted instances.

28. Danger Zone

Permanently wipe all Theme Designer Pro data including your theme gallery, CSS snippets, canvas scripts, gradient presets, and active configuration. This action cannot be undone. In a personal Themes tab, it removes your personal theme and your library.