You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/theming.mdx
+88-7Lines changed: 88 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,17 +70,17 @@ A theme is a single JSON object with the following properties. Only `id`, `name`
70
70
|`emoji`|`string`| An emoji to represent your theme in the UI. |
71
71
|`metaThemeColor`|`string`| A hex color (`#RRGGBB`) for the browser's UI elements. |
72
72
|`variables`|`object`| An object where keys are CSS variable names and values are the new colors. |
73
-
|`gradient`|`object`| Defines a background gradient. See details below. |
73
+
|`gradient`|`object`| Defines a background gradient. See the "Backgrounds" section for details.|
74
74
|`tsparticlesConfig`|`object`| A configuration object for [tsParticles](https://particles.js.org/). |
75
75
|`animationScript`|`string`| A string of JavaScript code to be run in a web worker for custom canvas animations. |
76
76
|`css`|`string`| A string of custom CSS rules to be injected. |
77
77
|`sourceUrl`|`string`| A URL pointing to the raw `theme.json` file, allowing for automatic update checks. |
78
78
|`systemBackgroundImageUrl`|`string`| URL for an image to be used as the main background for the entire UI. |
79
-
|`systemBackgroundImageDarken`|`number`| A value from 0 to 1 to control the darkness of the system background image. |
79
+
|`systemBackgroundImageDarken`|`number`| A value from 0 to 100 to control the darkness of the system background image. |
80
80
|`chatBackgroundImageUrl`|`string`| URL for an image to be used as the background for the chat message area. |
81
-
|`chatBackgroundImageDarken`|`number`| A value from 0 to 1 to control the darkness of the chat background image. |
81
+
|`chatBackgroundImageDarken`|`number`| A value from 0 to 100 to control the darkness of the chat background image. |
82
82
|`toggles`|`object`| An object to selectively enable or disable theme features. See the "Advanced Theming" section for details. |
83
-
|`codeMirrorTheme`|`string`| The name of a [CodeMirror theme](https://codemirror.net/5/demo/theme.html) for the text editor. |
83
+
|`codeMirrorTheme`|`string`| The name of a [CodeMirror theme](https://codemirror.net/5/demo/theme.html) for the text editor. See the "CodeMirror Themes" section for a full list of options.|
84
84
85
85
### Creating a Theme
86
86
@@ -123,6 +123,59 @@ Here are the available toggles:
123
123
-`systemBackgroundImage`
124
124
-`chatBackgroundImage`
125
125
126
+
### CodeMirror Themes
127
+
128
+
You can customize the appearance of the code editor in Open WebUI by specifying a CodeMirror theme in the `codeMirrorTheme` property of your `theme.json`. A wide variety of themes are available to choose from.
129
+
130
+
Here is a list of the available CodeMirror themes:
131
+
132
+
-`one-dark` (Default)
133
+
-`abcdef`
134
+
-`abyss`
135
+
-`androidstudio`
136
+
-`andromeda`
137
+
-`atomone`
138
+
-`aura`
139
+
-`bbedit`
140
+
-`basicLight`
141
+
-`basicDark`
142
+
-`bespin`
143
+
-`copilot`
144
+
-`consoleLight`
145
+
-`consoleDark`
146
+
-`dracula`
147
+
-`darcula`
148
+
-`duotoneLight`
149
+
-`duotoneDark`
150
+
-`eclipse`
151
+
-`githubLight`
152
+
-`githubDark`
153
+
-`gruvboxDark`
154
+
-`gruvboxLight`
155
+
-`materialLight`
156
+
-`materialDark`
157
+
-`monokai`
158
+
-`monokaiDimmed`
159
+
-`kimbie`
160
+
-`noctisLilac`
161
+
-`nord`
162
+
-`okaidia`
163
+
-`quietlight`
164
+
-`red`
165
+
-`solarizedLight`
166
+
-`solarizedDark`
167
+
-`sublime`
168
+
-`tokyoNight`
169
+
-`tokyoNightStorm`
170
+
-`tokyoNightDay`
171
+
-`tomorrowNightBlue`
172
+
-`whiteLight`
173
+
-`whiteDark`
174
+
-`vscodeDark`
175
+
-`vscodeLight`
176
+
-`xcodeLight`
177
+
-`xcodeDark`
178
+
126
179
### The Documentation Tab
127
180
The Theme Editor includes a "Documentation" tab, which is a valuable resource when creating themes. It contains a table of all available CSS variables with their default values and descriptions, as well as the full theme schema.
128
181
@@ -147,7 +200,34 @@ This theme creates a "Forest" look by overriding the default CSS color variables
147
200
}
148
201
```
149
202
150
-
### Example 2: Gradient Background Theme
203
+
### Backgrounds
204
+
205
+
You can customize the background of the application in two ways: with a gradient or with an image.
206
+
207
+
#### Gradient Background
208
+
209
+
The `gradient` property allows you to create a smooth, and optionally animated, color gradient for the main UI background.
0 commit comments