The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(theming): document theme configuration options
Steven Enamakel94c3d7e4840d
diff --git a/gitbooks/features/theming.md b/gitbooks/features/theming.mdindex 7b4ebd9b5d..50dd9e202e 100644--- a/gitbooks/features/theming.md+++ b/gitbooks/features/theming.md@@ -1,23 +1,21 @@---description: >-- Five theme families with light, dark and auto variants, a visual Theme Studio- for colours, fonts and backdrops, and Appearance controls for text size,- corner rounding and borders.+ Five theme families with light, dark and auto variants, a Theme Studio for+ colors, fonts and backdrops, and Appearance controls for text size, corner+ rounding and borders.icon: palette----# Themes & Theme Studio+# Themes and Theme Studio-OpenHuman is re-skinnable at runtime. Every change applies instantly and persists locally, with no restart.+You can re-skin OpenHuman at runtime. Every change applies instantly, is saved locally and needs no restart.The controls sit in two places:| Page | What you set there || --- | --- |-| **Settings → Appearance** (`/settings/appearance`) | Text size, corner rounding, border contrast, per-area borders |-| **Settings → Theme Studio** (`/settings/theme`) | Theme family, light/dark/auto, every colour token, fonts per role, the backdrop, and custom-theme management |-----+| Settings → Appearance (`/settings/appearance`) | Text size, corner rounding, border contrast, per-area borders |+| Settings → Theme Studio (`/settings/theme`) | Theme family, light, dark or auto, every color token, fonts per role, the backdrop and custom-theme management |## Built-in themes@@ -25,31 +23,27 @@ Five families ship in `app/src/lib/theme/presets.ts`, each with a light and a da| Family | Feel | Default variant || --- | --- | --- |-| **Classic** | The default OpenHuman look. | Light |-| **Ocean** | Cool blues. | Light |-| **Sepia** | Warm and paper-like, set in a serif. | Light |-| **Matrix** | High-contrast green on black, set in a monospace. | Dark |-| **HAL 9000** | Deep black with a red accent. | Dark |--Each family is applied as **Light**, **Dark** or **Auto**. Auto follows your operating system's `prefers-color-scheme` and re-applies live the moment you flip the OS between light and dark, with no reload.+| Classic | The default OpenHuman look. | Light |+| Ocean | Cool blues. | Light |+| Sepia | Warm and paper-like, set in a serif. | Light |+| Matrix | High-contrast green on black, set in a monospace. | Dark |+| HAL 9000 | Deep black with a red accent. | Dark |-Classic carries no colour or font overrides of its own on purpose: it is the palette defined in `app/src/styles/tokens.css`, selected by nothing more than the light/dark switch.-----+Each family is applied as Light, Dark or Auto. Auto follows your operating system's `prefers-color-scheme` and re-applies the moment you switch the OS between light and dark, with no reload.-## Colours+Classic has no color or font overrides of its own on purpose. It is the palette in `app/src/styles/tokens.css`, chosen by the light and dark switch alone.-The Theme Studio exposes every colour token, grouped as **Surfaces**, **Text**, **Borders** and **Accent colours**. The four accent ramps (primary, sage, amber, coral) show their `500` shade by default and expand to all eleven shades from `50` to `950`.+## Colors-Each token is stored as a space-separated RGB channel triple such as `255 255 255`, not a hex string, because Tailwind wraps every token as `rgb(var(--token) / <alpha-value>)` so opacity modifiers like `bg-surface/50` keep working. The reasoning is recorded at the top of `app/src/styles/tokens.css`.+The Theme Studio exposes every color token, grouped as Surfaces, Text, Borders and Accent colors. The four accent ramps (primary, sage, amber, coral) show their `500` shade by default and expand to all eleven shades from `50` to `950`.-A **contrast warning** appears when the luminance gap between `content` and `surface-canvas` falls under 0.2. It is advisory and does not block the change.+Each token is stored as a space-separated RGB channel triple such as `255 255 255`, not a hex string. Tailwind wraps every token as `rgb(var(--token) / <alpha-value>)`, so opacity modifiers like `bg-surface/50` keep working. The reasoning is at the top of `app/src/styles/tokens.css`.----+A contrast warning appears when the luminance gap between `content` and `surface-canvas` falls under 0.2. It is advisory and does not block the change.## Fonts-Five roles can each take a different family:+Each of five roles can take a different font family:| Role | Used for || --- | --- |@@ -59,15 +53,13 @@ Five roles can each take a different family:| `mono` | Code and fixed-width output || `serif` | Serif passages |-All five pick from the same six choices in `app/src/lib/theme/tokens.ts` (`FONT_CHOICES`): Inter, Cabinet Grotesk, System UI, Newsreader (serif), Georgia (serif) and JetBrains Mono. A role whose stored stack matches no choice shows a disabled **Current** entry rather than silently snapping to another font.--Cabinet Grotesk is not bundled, so every stack naming it resolves to Inter. The name is kept so the intended stack stays legible; see the note in `app/src/styles/tokens.css`.+All five pick from the same six choices in `app/src/lib/theme/tokens.ts` (`FONT_CHOICES`): Inter, Cabinet Grotesk, System UI, Newsreader (serif), Georgia (serif) and JetBrains Mono. A role whose stored stack matches no choice shows a disabled Current entry instead of silently switching to another font.----+Cabinet Grotesk is not bundled, so every stack naming it resolves to Inter. The name stays so the intended stack is still readable. See the note in `app/src/styles/tokens.css`.## Backdrop-Three kinds, set in the Theme Studio's **Background** card:+Three kinds, set in the Theme Studio's Background card:| Kind | What it paints || --- | --- |@@ -75,9 +67,7 @@ Three kinds, set in the Theme Studio's **Background** card:| `mesh` | An animated, theme-tinted WebGL mesh gradient. || `image` | A cover image from a URL you supply. |-No built-in preset sets a backdrop, so every family starts on `solid` and the animated shader is opt-in. The dotted-canvas overlay that once sat above all three was removed outright rather than defaulted off, so there is no setting to rediscover.-----+No built-in preset sets a backdrop, so every family starts on `solid` and the animated shader is opt-in.## Text size@@ -90,15 +80,13 @@ Four tiers, applied as an inline `font-size` on the root `<html>` element so eve| Large | 18px || Extra large | 20px |-Beyond the tiers, a **Custom size** number field and slider take any whole pixel value. It is clamped to **12px to 28px** by `clampFontSizePx` in `app/src/store/themeSlice.ts`, which brackets the tiers on both sides: denser than Small, larger than Extra large. A non-finite value falls back to 16. Picking a tile clears the custom value.-----+A Custom size number field and slider take any whole pixel value. `clampFontSizePx` in `app/src/store/themeSlice.ts` clamps it to 12px to 28px, so you can go denser than Small or larger than Extra large. A non-finite value falls back to 16. Picking a tier clears the custom value.## Layout-Three controls in `app/src/lib/theme/layout.ts`, all under Appearance, with a **Reset layout** button that restores every default.+Three controls in `app/src/lib/theme/layout.ts`, all under Appearance, with a Reset layout button that restores every default.-**Corner rounding** scales Tailwind's whole radius scale (`--radius-xs` through `--radius-5xl`) by one factor:+Corner rounding scales Tailwind's whole radius scale (`--radius-xs` through `--radius-5xl`) by one factor:| Option | Factor || --- | --- |@@ -109,60 +97,52 @@ Three controls in `app/src/lib/theme/layout.ts`, all under Appearance, with a **Pills and avatars use `rounded-full` rather than a radius token, so they stay round at any setting.-**Border contrast** adjusts `--line`, `--line-strong` and `--line-subtle`, leaving `--line-chrome` to the theme. The tokens are reset before each change, so levels never compound:+Border contrast adjusts `--line`, `--line-strong` and `--line-subtle`, and leaves `--line-chrome` to the theme. The tokens reset before each change, so levels never compound:| Option | Effect || --- | --- || Subtle | Mixes the line tokens 55 percent toward the surface |-| Default | No change: the theme's own values stand |+| Default | No change. The theme's own values stand || Strong | Mixes the line tokens 30 percent toward the text colour |-**Per-area borders** turn borders off for one area at a time, by setting a `data-borders-<area>="off"` attribute that `app/src/styles/layout-overrides.css` acts on. Four areas:+Per-area borders turn borders off for one area at a time. They set a `data-borders-<area>="off"` attribute that `app/src/styles/layout-overrides.css` acts on. There are four areas:| Area | Covers || --- | --- |-| Cards & panels | Settings cards, grouped sections and panels |+| Cards and panels | Settings cards, grouped sections and panels || Form controls | Text fields, text boxes and dropdowns || Row dividers | Hairlines between rows in lists || Window frame | The edge around the main content area |-----## Custom themes-Changing any colour, font or backdrop on a built-in preset forks it into a new custom theme named `<Name> (custom)` and makes that active. The preset stays pristine, so you can start from Ocean, tweak it, and keep both. Forking happens once per source theme.--A custom theme also offers **Reset overrides** (back to the preset it was forked from, or empty if it was not) and **Delete theme**, which falls back to Classic.+Changing any color, font or backdrop on a built-in preset forks it into a new custom theme named `<Name> (custom)` and makes that active. The preset stays untouched, so you can start from Ocean, tweak it and keep both. Forking happens once per source theme.-Sharing goes through JSON on the clipboard, not a file. **Copy JSON** puts the whole theme object in your clipboard and also renders it in a read-only text box to copy by hand. Import is a paste field: the JSON needs a `colors` object whose values are all strings, an empty one is accepted, and an unrecognised backdrop kind is dropped rather than failing the import. An imported theme gets a fresh id, so importing never overwrites what you have.+A custom theme also offers Reset overrides (back to the preset it was forked from, or empty if it was not forked) and Delete theme, which falls back to Classic.----+You share themes as JSON on the clipboard, not as a file. Copy JSON puts the whole theme object on your clipboard and also shows it in a read-only text box to copy by hand. Import is a paste field. The JSON needs a `colors` object whose values are all strings (an empty one is accepted). An unrecognized backdrop kind is dropped instead of failing the import. An imported theme gets a fresh id, so importing never overwrites what you have.## How a theme is applied-A theme is just a set of values for the tokens in `app/src/styles/tokens.css`. `applyTheme` in `app/src/providers/ThemeProvider.tsx` writes the active theme's colours and fonts as inline `--token` custom properties on the root `<html>` element, overriding the stylesheet's light and dark blocks at runtime.--**Presets and fully custom themes are the same mechanism.** There is no per-theme stylesheet class and no `data-theme` attribute. The only class involved is `.dark`, a light/dark base selector that also keeps residual Tailwind `dark:` utilities aligned. Any token a theme leaves out falls through to the stylesheet defaults, and tokens set by a previous theme are cleared on each switch so nothing leaks.+A theme is a set of values for the tokens in `app/src/styles/tokens.css`. `applyTheme` in `app/src/providers/ThemeProvider.tsx` writes the active theme's colors and fonts as inline `--token` custom properties on the root `<html>` element. They override the stylesheet's light and dark blocks at runtime.-Theme state persists through `redux-persist` under the `theme` key in plain `localStorage` rather than `userScopedStorage`, deliberately: the theme is a pre-login, whole-app preference, so it survives switching users instead of being scoped to one.+Presets and fully custom themes use the same mechanism. There is no per-theme stylesheet class and no `data-theme` attribute. The only class involved is `.dark`, a light and dark base selector that also keeps Tailwind `dark:` utilities aligned. Any token a theme leaves out falls through to the stylesheet defaults. Tokens set by a previous theme are cleared on each switch, so nothing leaks.----+Theme state persists through `redux-persist` under the `theme` key in plain `localStorage`, not `userScopedStorage`. The theme is a pre-login, whole-app preference, so it survives switching users instead of being scoped to one.## Not wired-Two fields in `app/src/store/themeSlice.ts` are persisted but inert. Neither has a UI control, and neither has a consumer:+Two fields in `app/src/store/themeSlice.ts` are persisted but do nothing. Neither has a UI control or a consumer:| Field | State || --- | --- |-| `developerMode` | Has a reducer and a `selectDeveloperMode` selector, but nothing dispatches or reads either. Its own doc comment points at a `useDeveloperMode` hook that does not exist. Developer Options gates on core mode instead. |-| `tabBarLabels` | Has a reducer and no selector at all, so there is not even a readable accessor. |+| `developerMode` | Has a reducer and a `selectDeveloperMode` selector, but nothing dispatches or reads either. Its doc comment points at a `useDeveloperMode` hook that does not exist. Developer Options gates on core mode instead. |+| `tabBarLabels` | Has a reducer and no selector, so nothing can read it. |-Both sit in the persist whitelist, so a stale default may sit in `localStorage` doing nothing. Editing either by hand has no visible effect.-----+Both are in the persist whitelist, so a stale default may sit in `localStorage`. Editing either by hand has no visible effect.## See also- [Theming (contributor reference)](../developing/theming.md): the token taxonomy, Tailwind wiring and component-authoring rules.-- [The Mascot](mascot/README.md): the other large piece of OpenHuman's personality.-- [Platform & Availability](platform.md): which desktop platforms the shell ships on.+- [The mascot](mascot/README.md): the other large piece of OpenHuman's personality.+- [Platform and availability](platform.md): which desktop platforms the shell ships on.