Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: rework Appearance settings and add flavor color themes (#12030)

Michael Han73858d5a3621
diff --git a/studio/backend/routes/settings.py b/studio/backend/routes/settings.py
index 72540c966b3..f0acb0f5716 100644
--- a/studio/backend/routes/settings.py
+++ b/studio/backend/routes/settings.py
@@ -50,6 +50,7 @@ from utils.utils import safe_curated_detail, safe_error_detail, log_and_http_err
from utils.personalization_settings import (
MAX_AVATAR_DATA_URL_BYTES,
PERSONALIZATION_VERSION,
+ drop_unknown_palette,
get_personalization,
set_personalization,
)
@@ -3982,13 +3983,42 @@ class PersonalizationAppearance(BaseModel):
model_config = ConfigDict(extra = "ignore")
theme: Literal["light", "dark", "system"] = "system"
- palette: Literal["standard", "classic", "minimal"] = "standard"
+ palette: Literal[
+ "standard",
+ "classic",
+ "minimal",
+ "blueberry",
+ "butterfly-pea",
+ "cherry",
+ "cinnamon",
+ "cotton-candy",
+ "dragon-fruit",
+ "earl-grey",
+ "espresso",
+ "honey",
+ "licorice",
+ "macaron",
+ "matcha",
+ "mint",
+ "neon-cyberpunk",
+ "oat-milk",
+ "peach",
+ "pina-paraiso",
+ "plum",
+ "tangerine",
+ "taro",
+ "wasabi",
+ "yuzu",
+ ] = "standard"
language: Optional[str] = Field(None, max_length = 20)
customization: PersonalizationCustomization = Field(
default_factory = PersonalizationCustomization
)
+_PALETTE_IDS = frozenset(get_args(PersonalizationAppearance.model_fields["palette"].annotation))
+
+
class PersonalizationPayload(BaseModel):
model_config = ConfigDict(extra = "ignore")
@@ -4011,7 +4041,7 @@ class PersonalizationResponse(PersonalizationPayload):
def get_personalization_settings(
current_subject: str = Depends(get_current_subject),
) -> PersonalizationResponse:
- stored = get_personalization()
+ stored = drop_unknown_palette(get_personalization(), _PALETTE_IDS)
response = PersonalizationResponse.model_validate(stored or {})
response.saved = bool(stored)
appearance = stored.get("appearance") if isinstance(stored, dict) else None
@@ -4056,8 +4086,10 @@ def update_personalization_settings(
log = logger,
) from exc
# Return the stored record, not the defaults-filled request, so the response
- # matches storage (and the next GET) for fields the client omitted.
- return PersonalizationPayload.model_validate(merged)
+ # matches storage (and the next GET) for fields the client omitted. An unknown
+ # stored palette is filtered like GET does; clients send a palette with every
+ # save, so the next save replaces it.
+ return PersonalizationPayload.model_validate(drop_unknown_palette(merged, _PALETTE_IDS))
# Backs Settings > Logs: the session log always existed, but its path was only printed to a console
diff --git a/studio/backend/utils/personalization_settings.py b/studio/backend/utils/personalization_settings.py
index 3efbf16623b..529c42559f5 100644
--- a/studio/backend/utils/personalization_settings.py
+++ b/studio/backend/utils/personalization_settings.py
@@ -14,6 +14,19 @@ def get_personalization() -> dict:
return stored if isinstance(stored, dict) else {}
+def drop_unknown_palette(stored: dict, palettes: frozenset[str]) -> dict:
+ """Drop a stored palette this build does not know, so it reads as unset.
+
+ A theme picked on a newer build, or one since removed, would otherwise fail
+ validation and take the whole personalization response down with it.
+ """
+ appearance = stored.get("appearance")
+ if not isinstance(appearance, dict) or appearance.get("palette", "standard") in palettes:
+ return stored
+ appearance = {k: v for k, v in appearance.items() if k != "palette"}
+ return {**stored, "appearance": appearance}
+
+
def set_personalization(data: dict) -> dict:
from storage.studio_db import upsert_app_settings
upsert_app_settings({PERSONALIZATION_SETTING_KEY: data})
diff --git a/studio/frontend/public/theme-boot.js b/studio/frontend/public/theme-boot.js
index 6ea6cce29a0..84e6aae297d 100644
--- a/studio/frontend/public/theme-boot.js
+++ b/studio/frontend/public/theme-boot.js
@@ -20,7 +20,15 @@ try {
root.classList.toggle("dark", dark);
root.classList.toggle("light", !dark);
root.style.colorScheme = dark ? "dark" : "light";
- if (palette === "classic" || palette === "minimal") {
+ // Keep in sync with COLOR_THEME_IDS ("standard" sets no attribute).
+ var palettes = [
+ "classic", "minimal", "blueberry", "butterfly-pea", "cherry",
+ "cinnamon", "cotton-candy", "dragon-fruit", "earl-grey", "espresso",
+ "honey", "licorice", "macaron", "matcha", "mint", "neon-cyberpunk",
+ "oat-milk", "peach", "pina-paraiso", "plum", "tangerine", "taro",
+ "wasabi", "yuzu",
+ ];
+ if (palettes.indexOf(palette) !== -1) {
root.setAttribute("data-palette", palette);
}
} catch (e) {}
diff --git a/studio/frontend/src/app/provider.tsx b/studio/frontend/src/app/provider.tsx
index eb9b1d18c2e..611811d88ed 100644
--- a/studio/frontend/src/app/provider.tsx
+++ b/studio/frontend/src/app/provider.tsx
@@ -36,6 +36,7 @@ import {
subscribeAppliedInterfaceZoom,
useAppearanceCustomStore,
useInterfaceScaleStore,
+ usePalette,
useTheme,
} from "@/features/settings";
import { SttDownloadPrompt } from "@/features/settings/components/stt-download-prompt";
@@ -1011,11 +1012,12 @@ function TauriWrapper({ children }: { children: ReactNode }) {
/** Mirrors the appearance customization store onto <html>; colors are per resolved light/dark mode. */
function AppearanceCustomizationEffect() {
const { theme, resolved } = useTheme();
+ const { palette } = usePalette();
const customization = useAppearanceCustomStore((s) => s.customization);
const interfaceScale = useInterfaceScaleStore((s) => s.scale);
useEffect(() => {
- applyCustomizationToDocument(customization, resolved);
- }, [customization, resolved]);
+ applyCustomizationToDocument(customization, resolved, palette);
+ }, [customization, resolved, palette]);
useEffect(() => {
if (!isTauri) return;
void import("@tauri-apps/api/window")
diff --git a/studio/frontend/src/features/settings/api/personalization.ts b/studio/frontend/src/features/settings/api/personalization.ts
index 81c53a5891f..ca2eac917a8 100644
--- a/studio/frontend/src/features/settings/api/personalization.ts
+++ b/studio/frontend/src/features/settings/api/personalization.ts
@@ -3,6 +3,7 @@
import { authFetch } from "@/features/auth";
import { readFastApiError } from "@/lib/format-fastapi-error";
+import type { ColorThemeId } from "../lib/color-themes";
import type { AppearanceCustomization } from "../stores/appearance-custom-store";
export type PersonalizationProfile = {
@@ -15,7 +16,7 @@ export type PersonalizationProfile = {
export type PersonalizationAppearance = {
theme: "light" | "dark" | "system";
- palette: "standard" | "classic" | "minimal";
+ palette: ColorThemeId;
language: string | null;
customization: AppearanceCustomization;
};
diff --git a/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx b/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx
index 31aff643a45..0c50be1cd63 100644
--- a/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx
+++ b/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx
@@ -64,6 +64,7 @@ import {
usePalette,
useTheme,
} from "../stores/theme-store";
+import { COLOR_THEMES } from "../lib/color-themes";
import { ColorPickerSwatch } from "./color-picker";
import { normalizeSizeInputDraft } from "./size-input-value";
@@ -75,20 +76,7 @@ type DefaultModeColors = { [K in keyof CustomModeColors]: string };
const PALETTE_DEFAULT_COLORS: Record<
Palette,
Record<ResolvedTheme, DefaultModeColors>
-> = {
- standard: {
- light: { accent: "#17b88b", background: "#fefefd", foreground: "#262626" },
- dark: { accent: "#17b88b", background: "#181818", foreground: "#dfdfdf" },
- },
- classic: {
- light: { accent: "#339cff", background: "#ffffff", foreground: "#1a1c1f" },
- dark: { accent: "#4dabff", background: "#181818", foreground: "#dfdfdf" },
- },
- minimal: {
- light: { accent: "#171717", background: "#ffffff", foreground: "#171717" },
- dark: { accent: "#ededed", background: "#181818", foreground: "#dfdfdf" },
- },
-};
+> = COLOR_THEMES;
/**
* Color override control for the CURRENTLY ACTIVE resolved mode. Only the
@@ -267,11 +255,13 @@ function FontSelect({
defaultFont,
onCommit,
ariaLabel,
+ className,
}: {
value: string | null;
defaultFont: string;
onCommit: (next: string | null) => void;
ariaLabel: string;
+ className?: string;
}) {
const t = useT();
const defaultLabel = `${defaultFont} (${t("settings.appearance.custom.fontDefault")})`;
@@ -335,7 +325,10 @@ function FontSelect({
type="button"
aria-label={ariaLabel}
aria-expanded={open}
- className="flex h-8 w-48 cursor-pointer items-center justify-between gap-1.5 rounded-full border border-border bg-background px-3.5 text-xs outline-none transition-colors hover:bg-accent/50 focus-visible:border-ring dark:focus-visible:border-transparent dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.12*var(--contrast-wash-gain,1)))] dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))] dark:hover:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))]"
+ className={cn(
+ "flex h-8 w-48 cursor-pointer items-center justify-between gap-1.5 rounded-full border border-border bg-background px-3.5 text-xs outline-none transition-colors hover:bg-accent/50 focus-visible:border-ring dark:focus-visible:border-transparent dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.12*var(--contrast-wash-gain,1)))] dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))] dark:hover:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))]",
+ className,
+ )}
>
<span
className="min-w-0 truncate"
@@ -477,7 +470,7 @@ function FontSelect({
);
}
-export function UiFontRow() {
+export function UiFontRow({ className }: { className?: string }) {
const t = useT();
const uiFont = useAppearanceCustomStore((s) => s.customization.uiFont);
const patch = useAppearanceCustomStore((s) => s.patch);
@@ -487,11 +480,12 @@ export function UiFontRow() {
defaultFont={DEFAULT_FONT_NAMES.ui}
onCommit={(next) => patch({ uiFont: next })}
ariaLabel={t("settings.appearance.custom.uiFont.label")}
+ className={className}
/>
);
}
-export function HeadingFontRow() {
+export function HeadingFontRow({ className }: { className?: string }) {
const t = useT();
const headingFont = useAppearanceCustomStore(
(s) => s.customization.headingFont,
@@ -503,11 +497,12 @@ export function HeadingFontRow() {
defaultFont={DEFAULT_FONT_NAMES.heading}
onCommit={(next) => patch({ headingFont: next })}
ariaLabel={t("settings.appearance.custom.headingFont.label")}
+ className={className}
/>
);
}
-export function ChatFontRow() {
+export function ChatFontRow({ className }: { className?: string }) {
const t = useT();
const chatFont = useAppearanceCustomStore((s) => s.customization.chatFont);
const patch = useAppearanceCustomStore((s) => s.patch);
@@ -517,11 +512,12 @@ export function ChatFontRow() {
defaultFont={DEFAULT_FONT_NAMES.chat}
onCommit={(next) => patch({ chatFont: next })}
ariaLabel={t("settings.appearance.custom.chatFont.label")}
+ className={className}
/>
);
}
-export function CodeFontRow() {
+export function CodeFontRow({ className }: { className?: string }) {
const t = useT();
const codeFont = useAppearanceCustomStore((s) => s.customization.codeFont);
const patch = useAppearanceCustomStore((s) => s.patch);
@@ -531,6 +527,7 @@ export function CodeFontRow() {
defaultFont={DEFAULT_FONT_NAMES.code}
onCommit={(next) => patch({ codeFont: next })}
ariaLabel={t("settings.appearance.custom.codeFont.label")}
+ className={className}
/>
);
}
@@ -801,7 +798,8 @@ function SizeInput({
onCommit(normalized.value);
};
return (
- <div className="flex items-center gap-1.5">
+ // Tagged so settings search can land on a size input nested in its font row.
+ <div data-settings-label={ariaLabel} className="flex items-center gap-1.5">
<Input
type="number"
inputMode="numeric"
diff --git a/studio/frontend/src/features/settings/components/color-theme-select.tsx b/studio/frontend/src/features/settings/components/color-theme-select.tsx
new file mode 100644
index 00000000000..c0f828c0824
--- /dev/null
+++ b/studio/frontend/src/features/settings/components/color-theme-select.tsx
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuSub,
+ DropdownMenuSubContent,
+ DropdownMenuSubTrigger,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { useT } from "@/i18n";
+import { ChevronDownStandardIcon } from "@/lib/chevron-icons";
+import { Tick02Icon } from "@/lib/tick-icon";
+import { cn } from "@/lib/utils";
+import { HugeiconsIcon } from "@hugeicons/react";
+import {
+ COLOR_THEMES,
+ FLAVOR_THEME_IDS,
+ type ColorThemeId,
+ UNSLOTH_THEME_IDS,
+} from "../lib/color-themes";
+import { usePalette, useTheme } from "../stores/theme-store";
+
+/** "Aa" swatch in the theme's background and accent. */
+function ThemeChip({
+ colors,
+}: {
+ colors: { background: string; accent: string } | null;
+}) {
+ return (
+ <span
+ aria-hidden="true"
+ className={cn(
+ "flex size-6 shrink-0 items-center justify-center rounded-full border text-ui-11 font-semibold leading-none",
+ colors
+ ? "border-black/10 dark:border-white/15"
+ : "border-border bg-muted text-muted-foreground",
+ )}
+ style={
+ colors
+ ? { backgroundColor: colors.background, color: colors.accent }
+ : undefined
+ }
+ >
+ Aa
+ </span>
+ );
+}
+
+export function ColorThemeSelect() {
+ const t = useT();
+ const { resolved } = useTheme();
+ const { palette, setPalette } = usePalette();
+
+ const nameOf = (id: ColorThemeId) =>
+ COLOR_THEMES[id].name ??
+ t(
+ `settings.appearance.palette.${id as (typeof UNSLOTH_THEME_IDS)[number]}`,
+ );
+
+ const renderItem = (id: ColorThemeId) => (
+ <DropdownMenuItem
+ key={id}
+ onSelect={() => setPalette(id)}
+ data-palette-value={id}
+ aria-checked={palette === id}
+ role="menuitemradio"
+ >
+ <ThemeChip colors={COLOR_THEMES[id][resolved]} />
+ <span className="min-w-0 flex-1 truncate">{nameOf(id)}</span>
+ {palette === id ? (
+ <HugeiconsIcon icon={Tick02Icon} className="size-4 text-foreground" />
+ ) : null}
+ </DropdownMenuItem>
+ );
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild={true}>
+ <button
+ type="button"
+ aria-label={t("settings.appearance.palette.label")}
+ className="flex h-9 w-52 cursor-pointer items-center gap-2 rounded-full border border-border bg-background pl-1.5 pr-3 text-sm outline-none transition-colors hover:bg-accent/50 focus-visible:border-ring data-[state=open]:bg-accent/50 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))] dark:hover:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))] dark:focus-visible:border-transparent dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.12*var(--contrast-wash-gain,1)))] dark:data-[state=open]:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))]"
+ >
+ <ThemeChip colors={COLOR_THEMES[palette][resolved]} />
+ <span className="min-w-0 flex-1 truncate text-left">
+ {nameOf(palette)}
+ </span>
+ <HugeiconsIcon
+ icon={ChevronDownStandardIcon}
+ strokeWidth={2}
+ className="size-4 shrink-0 text-muted-foreground"
+ />
+ </button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" sideOffset={6} className="w-52">
+ {UNSLOTH_THEME_IDS.map(renderItem)}
+ <DropdownMenuSeparator />
+ <DropdownMenuSub>
+ <DropdownMenuSubTrigger className="gap-2.5">
+ <ThemeChip colors={null} />
+ <span className="flex-1 whitespace-nowrap">
+ {t("settings.appearance.palette.moreThemes")}
+ </span>
+ </DropdownMenuSubTrigger>
+ {/* Cap height and scroll an inner viewport to keep rounded corners. */}
+ <DropdownMenuSubContent className="flex max-h-[min(--spacing(112),var(--radix-dropdown-menu-content-available-height))] w-56 flex-col">
+ <div className="min-h-0 flex-1 overflow-y-auto overflow-x-hidden">
+ {FLAVOR_THEME_IDS.map(renderItem)}
+ </div>
+ </DropdownMenuSubContent>
+ </DropdownMenuSub>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/studio/frontend/src/features/settings/components/palette-cards.tsx b/studio/frontend/src/features/settings/components/palette-cards.tsx
deleted file mode 100644
index 049ac099bbf..00000000000
--- a/studio/frontend/src/features/settings/components/palette-cards.tsx
+++ /dev/null
@@ -1,146 +0,0 @@
-// SPDX-License-Identifier: AGPL-3.0-only
-// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
-
-import { type TranslationKey, useT } from "@/i18n";
-import {
- type Palette,
- type ResolvedTheme,
- usePalette,
- useTheme,
-} from "../stores/theme-store";
-
-type PreviewColors = {
- bg: string;
- sidebar: string;
- accent: string;
- text: string;
- border: string;
-};
-
-// Representative swatches per palette × resolved mode. Hardcoded (rather than
-// reading the live CSS variables) so every card previews its own palette while
-// only one palette is active on <html>. Sidebar tones are slightly exaggerated
-// so the two surfaces stay distinguishable at thumbnail size.
-const PREVIEWS: Record<Palette, Record<ResolvedTheme, PreviewColors>> = {
- standard: {
- light: {
- bg: "#fefefd",
- sidebar: "#f1f1ef",
- accent: "#17b88b",
- text: "#444444",
- border: "#e4e4e0",
- },
- dark: {
- bg: "#181818",
- sidebar: "#272727",
- accent: "#17b88b",
- text: "#dfdfdf",
- border: "#3a3a3a",
- },
- },
- classic: {
- light: {
- bg: "#ffffff",
- sidebar: "#ededed",
- accent: "#339cff",
- text: "#4b4d50",
- border: "#e6e6e6",
- },
- dark: {
- bg: "#181818",
- sidebar: "#272727",
- accent: "#4dabff",
- text: "#dfdfdf",
- border: "#3a3a3a",
- },
- },
- minimal: {
- light: {
- bg: "#ffffff",
- sidebar: "#f2f2f2",
- accent: "#171717",
- text: "#555555",
- border: "#e2e2e2",
- },
- dark: {
- bg: "#181818",
- sidebar: "#272727",
- accent: "#ededed",
- text: "#dfdfdf",
- border: "#3a3a3a",
- },
- },
-};
-
-const OPTIONS: {
- value: Palette;
- labelKey: TranslationKey;
-}[] = [
- { value: "standard", labelKey: "settings.appearance.palette.standard" },
- { value: "classic", labelKey: "settings.appearance.palette.classic" },
- { value: "minimal", labelKey: "settings.appearance.palette.minimal" },
-];
-
-function PalettePreview({ colors }: { colors: PreviewColors }) {
- return (
- <div
- className="h-16 w-full overflow-hidden rounded-lg border"
- style={{ backgroundColor: colors.bg, borderColor: colors.border }}
- aria-hidden="true"
- >
- <div className="flex h-full">
- <div
- className="h-full w-1/4"
- style={{ backgroundColor: colors.sidebar }}
- />
- <div className="flex flex-1 flex-col justify-center gap-1.5 px-2.5">
- <span
- className="h-1.5 w-3/4 rounded-full"
- style={{ backgroundColor: colors.text }}
- />
- <span
- className="h-1.5 w-1/2 rounded-full opacity-60"
- style={{ backgroundColor: colors.text }}
- />
- <span
- className="h-2.5 w-8 rounded-full"
- style={{ backgroundColor: colors.accent }}
- />
- </div>
- </div>
- </div>
- );
-}
-
-export function PaletteCards() {
- const t = useT();
- const { resolved } = useTheme();
- const { palette, setPalette } = usePalette();
- return (
- <div className="grid w-full grid-cols-1 gap-3 sm:grid-cols-3">
- {OPTIONS.map((opt) => {
- const active = palette === opt.value;
- return (
- <button
- key={opt.value}
- type="button"
- onClick={() => setPalette(opt.value)}
- aria-pressed={active}
- data-palette-value={opt.value}
- // The active ring is CSS-driven off html[data-palette] (see .palette-card in index.css)
- // so it moves in the same style pass that swaps the tokens; keying it off React state
- // leaves the ring on the old card until the app finishes re-rendering.
- className="palette-card flex flex-col gap-2 rounded-xl border border-border p-2.5 text-left transition-colors focus-visible:border-ring focus-visible:outline-none"
- >
- <PalettePreview colors={PREVIEWS[opt.value][resolved]} />
- <div className="flex items-center gap-2 px-0.5">
- <span className="text-sm font-medium text-foreground">
- {t(opt.labelKey)}
- </span>
- </div>
- </button>
- );
- })}
- </div>
- );
-}
diff --git a/studio/frontend/src/features/settings/lib/color-themes.ts b/studio/frontend/src/features/settings/lib/color-themes.ts
new file mode 100644
index 00000000000..e129e9cec31
--- /dev/null
+++ b/studio/frontend/src/features/settings/lib/color-themes.ts
@@ -0,0 +1,406 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+// Color themes (the `palette` preference). Tokens live in index.css under
+// html[data-palette]. Keep ids in sync with public/theme-boot.js and the
+// backend `palette` Literal in routes/settings.py.
+
+export const UNSLOTH_THEME_IDS = ["standard", "classic", "minimal"] as const;
+
+export const FLAVOR_THEME_IDS = [
+ "matcha",
+ "espresso",
+ "blueberry",
+ "cherry",
+ "honey",
+ "neon-cyberpunk",
+ "macaron",
+ "pina-paraiso",
+ "mint",
+ "taro",
+ "licorice",
+ "butterfly-pea",
+ "tangerine",
+ "earl-grey",
+ "plum",
+ "wasabi",
+ "oat-milk",
+ "cinnamon",
+ "dragon-fruit",
+ "peach",
+ "yuzu",
+ "cotton-candy",
+] as const;
+
+export const COLOR_THEME_IDS = [
+ ...UNSLOTH_THEME_IDS,
+ ...FLAVOR_THEME_IDS,
+] as const;
+
+export type ColorThemeId = (typeof COLOR_THEME_IDS)[number];
+
+export type ThemeModeColors = {
+ accent: string;
+ background: string;
+ foreground: string;
+ /** Flavor themes only: card and menu color. */
+ surface?: string;
+};
+
+type ColorThemeMeta = {
+ /** Flavor themes only; Unsloth themes use i18n keys. */
+ name?: string;
+ light: ThemeModeColors;
+ dark: ThemeModeColors;
+};
+
+export const COLOR_THEMES: Record<ColorThemeId, ColorThemeMeta> = {
+ standard: {
+ light: { accent: "#17b88b", background: "#fefefd", foreground: "#262626" },
+ dark: { accent: "#17b88b", background: "#181818", foreground: "#dfdfdf" },
+ },
+ classic: {
+ light: { accent: "#339cff", background: "#ffffff", foreground: "#1a1c1f" },
+ dark: { accent: "#4dabff", background: "#181818", foreground: "#dfdfdf" },
+ },
+ minimal: {
+ light: { accent: "#171717", background: "#ffffff", foreground: "#171717" },
+ dark: { accent: "#ededed", background: "#181818", foreground: "#dfdfdf" },
+ },
+ matcha: {
+ name: "Matcha",
+ light: {
+ accent: "#437a22",
+ background: "#f6f8f1",
+ foreground: "#1d2618",
+ surface: "#eef2e6",
+ },
+ dark: {
+ accent: "#8cc265",
+ background: "#151a15",
+ foreground: "#e1ead9",
+ surface: "#1b221b",
+ },
+ },
+ espresso: {
+ name: "Espresso Amore",
+ light: {
+ accent: "#8a5a33",
+ background: "#faf6f2",
+ foreground: "#2b201a",
+ surface: "#f3ece5",
+ },
+ dark: {
+ accent: "#d69a5e",
+ background: "#1c1613",
+ foreground: "#eadfd6",
+ surface: "#251d19",
+ },
+ },
+ blueberry: {
+ name: "Blueberry",
+ light: {
+ accent: "#4a5bdc",
+ background: "#f6f7fc",
+ foreground: "#1c2140",
+ surface: "#eef0f9",
+ },
+ dark: {
+ accent: "#7c8cff",
+ background: "#141726",
+ foreground: "#dde2f5",
+ surface: "#1b1f33",
+ },
+ },
+ cherry: {
+ name: "Cherry Cola",
+ light: {
+ accent: "#c8102e",
+ background: "#fdf6f6",
+ foreground: "#300f12",
+ surface: "#f9ebeb",
+ },
+ dark: {
+ accent: "#ff4d5e",
+ background: "#1b1112",
+ foreground: "#f4dfe0",
+ surface: "#241718",
+ },
+ },
+ honey: {
+ name: "Honey",
+ light: {
+ accent: "#c98a00",
+ background: "#fdf9ef",
+ foreground: "#2a2310",
+ surface: "#f8f1de",
+ },
+ dark: {
+ accent: "#f2b631",
+ background: "#1a1710",
+ foreground: "#f0e6cf",
+ surface: "#231f15",
+ },
+ },
+ "neon-cyberpunk": {
+ name: "Neon Cyberpunk",
+ light: {
+ accent: "#0a0a0f",
+ background: "#f0fbfc",
+ foreground: "#0a0a0f",
+ surface: "#e2f6f8",
+ },
+ dark: {
+ accent: "#fcee0a",
+ background: "#070b14",
+ foreground: "#eafcff",
+ surface: "#0d1424",
+ },
+ },
+ macaron: {
+ name: "Macaron",
+ light: {
+ accent: "#d61f55",
+ background: "#fdf6f8",
+ foreground: "#33121d",
+ surface: "#f9ecf0",
+ },
+ dark: {
+ accent: "#ff4f7b",
+ background: "#1d1216",
+ foreground: "#f3e0e6",
+ surface: "#26181d",
+ },
+ },
+ "pina-paraiso": {
+ name: "Piña Paraíso",
+ light: {
+ accent: "#f2b800",
+ background: "#fffcf0",
+ foreground: "#2c2410",
+ surface: "#fbf5df",
+ },
+ dark: {
+ accent: "#ffd23f",
+ background: "#17150c",
+ foreground: "#f6efd6",
+ surface: "#201d11",
+ },
+ },
+ mint: {
+ name: "Mint",
+ light: {
+ accent: "#0f9e80",
+ background: "#f3f9f7",
+ foreground: "#12302a",
+ surface: "#e9f4f1",
+ },
+ dark: {
+ accent: "#4fd1b3",
+ background: "#111b1a",
+ foreground: "#dcefeb",
+ surface: "#172322",
+ },
+ },
+ taro: {
+ name: "Ube Chiffon",
+ light: {
+ accent: "#7b5fc4",
+ background: "#f9f7fc",
+ foreground: "#241d33",
+ surface: "#f1edf8",
+ },
+ dark: {
+ accent: "#b69cf0",
+ background: "#17141f",
+ foreground: "#e6e0f2",
+ surface: "#1e1a28",
+ },
+ },
+ licorice: {
+ name: "Licorice",
+ light: {
+ accent: "#d12d34",
+ background: "#fafafa",
+ foreground: "#111114",
+ surface: "#f2f2f3",
+ },
+ dark: {
+ accent: "#e5484d",
+ background: "#0e0e10",
+ foreground: "#ececf1",
+ surface: "#16161a",
+ },
+ },
+ "butterfly-pea": {
+ name: "Butterfly Pea",
+ light: {
+ accent: "#0077c8",
+ background: "#f4f9fd",
+ foreground: "#0f2233",
+ surface: "#e9f2fa",
+ },
+ dark: {
+ accent: "#38b6ff",
+ background: "#0f1520",
+ foreground: "#dcebf8",
+ surface: "#141c2a",
+ },
+ },
+ tangerine: {
+ name: "Tangerine Dreams",
+ light: {
+ accent: "#e36a00",
+ background: "#fdf8f3",
+ foreground: "#2f1f10",
+ surface: "#f9efe5",
+ },
+ dark: {
+ accent: "#ff8c2b",
+ background: "#1b1510",
+ foreground: "#f3e5d6",
+ surface: "#241c15",
+ },
+ },
+ "earl-grey": {
+ name: "Earl Grey",
+ light: {
+ accent: "#4f6b8a",
+ background: "#f6f7f9",
+ foreground: "#1c2129",
+ surface: "#eceff3",
+ },
+ dark: {
+ accent: "#9db4cf",
+ background: "#15171b",
+ foreground: "#e2e6ec",
+ surface: "#1c1f24",
+ },
+ },
+ plum: {
+ name: "Plum Praline",
+ light: {
+ accent: "#8b3fd1",
+ background: "#fbf7fd",
+ foreground: "#2a1836",
+ surface: "#f4ecf8",
+ },
+ dark: {
+ accent: "#c77dff",
+ background: "#1a1320",
+ foreground: "#eadff2",
+ surface: "#22192a",
+ },
+ },
+ wasabi: {
+ name: "Lime",
+ light: {
+ accent: "#4f7d00",
+ background: "#f8faf2",
+ foreground: "#1a2410",
+ surface: "#eef3e3",
+ },
+ dark: {
+ accent: "#b4e33d",
+ background: "#121710",
+ foreground: "#e3eed8",
+ surface: "#181f15",
+ },
+ },
+ "oat-milk": {
+ name: "Oat",
+ light: {
+ accent: "#86683f",
+ background: "#fbf8f3",
+ foreground: "#2e2921",
+ surface: "#f4efe7",
+ },
+ dark: {
+ accent: "#d9b98c",
+ background: "#1d1b18",
+ foreground: "#ece6dc",
+ surface: "#25221e",
+ },
+ },
+ cinnamon: {
+ name: "Cinnamon",
+ light: {
+ accent: "#a8461f",
+ background: "#fcf7f4",
+ foreground: "#2e1a12",
+ surface: "#f6ece6",
+ },
+ dark: {
+ accent: "#e8804f",
+ background: "#1b1411",
+ foreground: "#f0e1d8",
+ surface: "#241b17",
+ },
+ },
+ "dragon-fruit": {
+ name: "Dragon Fruit",
+ light: {
+ accent: "#c2127f",
+ background: "#fdf6fa",
+ foreground: "#300c24",
+ surface: "#f8eaf3",
+ },
+ dark: {
+ accent: "#ff3da8",
+ background: "#1c0f18",
+ foreground: "#f8e0ef",
+ surface: "#261420",
+ },
+ },
+ peach: {
+ name: "Peach",
+ light: {
+ accent: "#e0703d",
+ background: "#fdf7f3",
+ foreground: "#33211a",
+ surface: "#f9eee7",
+ },
+ dark: {
+ accent: "#ffa07a",
+ background: "#1c1614",
+ foreground: "#f2e4dc",
+ surface: "#251d1a",
+ },
+ },
+ yuzu: {
+ name: "Yuzu",
+ light: {
+ accent: "#d4c400",
+ background: "#fcfcf2",
+ foreground: "#22260f",
+ surface: "#f5f6e4",
+ },
+ dark: {
+ accent: "#e8dd3a",
+ background: "#16170f",
+ foreground: "#eeefd8",
+ surface: "#1e2015",
+ },
+ },
+ "cotton-candy": {
+ name: "Cotton Candy",
+ light: {
+ accent: "#c2378f",
+ background: "#fdf8fb",
+ foreground: "#2a1830",
+ surface: "#f7eef6",
+ },
+ dark: {
+ accent: "#ff8fd0",
+ background: "#1a1420",
+ foreground: "#f5e4f4",
+ surface: "#221a29",
+ },
+ },
+};
+
+const COLOR_THEME_ID_SET: ReadonlySet<string> = new Set(COLOR_THEME_IDS);
+
+export function isColorThemeId(value: unknown): value is ColorThemeId {
+ return typeof value === "string" && COLOR_THEME_ID_SET.has(value);
+}
diff --git a/studio/frontend/src/features/settings/stores/appearance-custom-store.ts b/studio/frontend/src/features/settings/stores/appearance-custom-store.ts
index ebc95a0f091..fb68c3961d7 100644
--- a/studio/frontend/src/features/settings/stores/appearance-custom-store.ts
+++ b/studio/frontend/src/features/settings/stores/appearance-custom-store.ts
@@ -7,6 +7,7 @@ import {
createJSONStorage,
persist,
} from "zustand/middleware";
+import { COLOR_THEMES, type ColorThemeId } from "../lib/color-themes.ts";
import type { ResolvedTheme } from "./theme-store";
// Best-effort persistence: localStorage can be blocked (private browsing) and
@@ -690,15 +691,27 @@ function readableForeground(hex: string): string {
return FOREGROUND_DARK_FALLBACK;
}
+type PaletteSurfaces = { background: string; elevated: readonly string[] };
+
/** Palette surfaces that custom colors do not replace. */
-const PALETTE_SURFACES: Record<
- ResolvedTheme,
- { background: string; elevated: string }
-> = {
- light: { background: "#ffffff", elevated: "#ffffff" },
- dark: { background: "#181818", elevated: "#272727" },
+const PALETTE_SURFACES: Record<ResolvedTheme, PaletteSurfaces> = {
+ light: { background: "#ffffff", elevated: ["#ffffff"] },
+ dark: { background: "#181818", elevated: ["#272727"] },
};
+/** Flavor themes bring their own page and cards; light composers stay white. */
+function surfacesFor(
+ palette: ColorThemeId,
+ resolved: ResolvedTheme,
+): PaletteSurfaces {
+ const { background, surface } = COLOR_THEMES[palette][resolved];
+ if (!surface) return PALETTE_SURFACES[resolved];
+ return {
+ background,
+ elevated: resolved === "light" ? [surface, "#ffffff"] : [surface],
+ };
+}
+
/**
* Black for ink darker than its page, white for lighter. Raising pushes ink
* away from the surface it sits on, so a mid grey never heads into its page.
@@ -866,6 +879,7 @@ const ACCENT_FG_VARS = [
export function applyCustomizationToDocument(
c: AppearanceCustomization,
resolved: ResolvedTheme,
+ palette: ColorThemeId = "standard",
): void {
if (typeof document === "undefined") return;
const el = document.documentElement;
@@ -877,12 +891,12 @@ export function applyCustomizationToDocument(
};
const colors = c.colors[resolved];
- const paletteSurfaces = PALETTE_SURFACES[resolved];
+ const paletteSurfaces = surfacesFor(palette, resolved);
const accent = colors.accent
? legibleAccent(colors.accent, [
colors.background ?? paletteSurfaces.background,
- paletteSurfaces.elevated,
+ ...paletteSurfaces.elevated,
])
: null;
for (const name of ACCENT_VARS) setVar(name, accent);
diff --git a/studio/frontend/src/features/settings/stores/theme-store.ts b/studio/frontend/src/features/settings/stores/theme-store.ts
index 15beaaa7bd1..195068c13a9 100644
--- a/studio/frontend/src/features/settings/stores/theme-store.ts
+++ b/studio/frontend/src/features/settings/stores/theme-store.ts
@@ -2,18 +2,23 @@
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import { useSyncExternalStore } from "react";
+import {
+ COLOR_THEME_IDS,
+ type ColorThemeId,
+ isColorThemeId,
+} from "../lib/color-themes";
export type Theme = "light" | "dark" | "system";
export type ResolvedTheme = "light" | "dark";
-export type Palette = "standard" | "classic" | "minimal";
+export type Palette = ColorThemeId;
const STORAGE_KEY = "theme";
const PALETTE_STORAGE_KEY = "palette";
-export const PALETTES: readonly Palette[] = ["standard", "classic", "minimal"];
+export const PALETTES: readonly Palette[] = COLOR_THEME_IDS;
export function isPalette(value: unknown): value is Palette {
- return value === "standard" || value === "classic" || value === "minimal";
+ return isColorThemeId(value);
}
// Persist a re-derived literal from a fixed allow-list rather than the argument,
@@ -24,11 +29,9 @@ const STORED_THEME: Record<Theme, Theme> = {
dark: "dark",
system: "system",
};
-const STORED_PALETTE: Record<Palette, Palette> = {
- standard: "standard",
- classic: "classic",
- minimal: "minimal",
-};
+const STORED_PALETTE = Object.fromEntries(
+ COLOR_THEME_IDS.map((id) => [id, id]),
+) as Record<Palette, Palette>;
function readStoredTheme(): Theme {
if (typeof window === "undefined") return "system";
diff --git a/studio/frontend/src/features/settings/tabs/appearance-tab.tsx b/studio/frontend/src/features/settings/tabs/appearance-tab.tsx
index 01a631b4bbe..08140ea2072 100644
--- a/studio/frontend/src/features/settings/tabs/appearance-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/appearance-tab.tsx
@@ -21,21 +21,19 @@ import {
UiFontRow,
UiFontSizeRow,
} from "../components/appearance-custom-controls";
-import { PaletteCards } from "../components/palette-cards";
+import { ColorThemeSelect } from "../components/color-theme-select";
import { SettingsRow } from "../components/settings-row";
import { SidebarMenuCustomizer } from "../components/sidebar-menu-customizer";
import { SidebarNavCustomizer } from "../components/sidebar-nav-customizer";
-import {
- SettingsGroupDivider,
- SettingsSection,
-} from "../components/settings-section";
+import { SettingsSection } from "../components/settings-section";
import { ThemeSegmented } from "../components/theme-segmented";
import { useSettingsDialogStore } from "../stores/settings-dialog-store";
-import { useTheme } from "../stores/theme-store";
+
+const FONT_CONTROL_CLASS = "flex w-76 max-w-full items-center gap-2";
+const FONT_SELECT_CLASS = "w-auto min-w-0 flex-1";
export function AppearanceTab() {
const t = useT();
- const { resolved } = useTheme();
const { pinned, setPinned } = useSidebarPin();
// The sidebar's "Customize sidebar" entry lands mid-page, so scroll its section into view.
const sidebarNavSectionRef = useRef<HTMLDivElement | null>(null);
@@ -66,27 +64,58 @@ export function AppearanceTab() {
</header>
<SettingsSection title={t("settings.appearance.theme.title")}>
- <SettingsRow
- label={t("settings.appearance.theme.label")}
- description={t("settings.appearance.theme.description")}
- >
+ <SettingsRow label={t("settings.appearance.theme.label")}>
<ThemeSegmented />
</SettingsRow>
- <SettingsRow
- label={t("settings.appearance.palette.label")}
- description={t("settings.appearance.palette.description")}
- className="flex-col items-stretch gap-3"
- >
- <PaletteCards />
+ <SettingsRow label={t("settings.appearance.palette.label")}>
+ <ColorThemeSelect />
+ </SettingsRow>
+ <SettingsRow label={t("settings.appearance.custom.colors.accent")}>
+ <ActiveColorControl
+ colorKey="accent"
+ label={t("settings.appearance.custom.colors.accent")}
+ />
+ </SettingsRow>
+ <SettingsRow label={t("settings.appearance.custom.colors.background")}>
+ <ActiveColorControl
+ colorKey="background"
+ label={t("settings.appearance.custom.colors.background")}
+ />
+ </SettingsRow>
+ <SettingsRow label={t("settings.appearance.custom.colors.foreground")}>
+ <ActiveColorControl
+ colorKey="foreground"
+ label={t("settings.appearance.custom.colors.foreground")}
+ />
+ </SettingsRow>
+ <SettingsRow label={t("settings.appearance.custom.contrast.label")}>
+ <ContrastSliderRow />
</SettingsRow>
</SettingsSection>
<SettingsSection title={t("settings.appearance.custom.preferencesTitle")}>
+ {/* Shared width so the font pickers line up. */}
<SettingsRow label={t("settings.appearance.custom.uiFont.label")}>
- <UiFontRow />
+ <div className={FONT_CONTROL_CLASS}>
+ <UiFontRow className={FONT_SELECT_CLASS} />
+ <UiFontSizeRow />
+ </div>
+ </SettingsRow>
+ <SettingsRow label={t("settings.appearance.custom.headingFont.label")}>
+ <div className={FONT_CONTROL_CLASS}>
+ <HeadingFontRow className={FONT_SELECT_CLASS} />
+ </div>
+ </SettingsRow>
+ <SettingsRow label={t("settings.appearance.custom.chatFont.label")}>
+ <div className={FONT_CONTROL_CLASS}>
+ <ChatFontRow className={FONT_SELECT_CLASS} />
+ </div>
</SettingsRow>
<SettingsRow label={t("settings.appearance.custom.codeFont.label")}>
- <CodeFontRow />
+ <div className={FONT_CONTROL_CLASS}>
+ <CodeFontRow className={FONT_SELECT_CLASS} />
+ <CodeFontSizeRow />
+ </div>
</SettingsRow>
<SettingsRow
label={t("settings.appearance.custom.interfaceScale.label")}
@@ -116,18 +145,6 @@ export function AppearanceTab() {
>
<ReduceMotionSegmented />
</SettingsRow>
- <SettingsRow
- label={t("settings.appearance.custom.uiFontSize.label")}
- description={t("settings.appearance.custom.uiFontSize.description")}
- >
- <UiFontSizeRow />
- </SettingsRow>
- <SettingsRow
- label={t("settings.appearance.custom.codeFontSize.label")}
- description={t("settings.appearance.custom.codeFontSize.description")}
- >
- <CodeFontSizeRow />
- </SettingsRow>
<SettingsRow
label={t("settings.appearance.custom.fontSmoothing.label")}
description={t(
@@ -146,44 +163,6 @@ export function AppearanceTab() {
</SettingsRow>
</SettingsSection>
- <SettingsSection
- title={t(
- resolved === "light"
- ? "settings.appearance.custom.colors.lightGroup"
- : "settings.appearance.custom.colors.darkGroup",
- )}
- >
- <SettingsRow label={t("settings.appearance.custom.colors.accent")}>
- <ActiveColorControl
- colorKey="accent"
- label={t("settings.appearance.custom.colors.accent")}
- />
- </SettingsRow>
- <SettingsRow label={t("settings.appearance.custom.colors.background")}>
- <ActiveColorControl
- colorKey="background"
- label={t("settings.appearance.custom.colors.background")}
- />
- </SettingsRow>
- <SettingsRow label={t("settings.appearance.custom.colors.foreground")}>
- <ActiveColorControl
- colorKey="foreground"
- label={t("settings.appearance.custom.colors.foreground")}
- />
- </SettingsRow>
- <SettingsGroupDivider />
- <SettingsRow label={t("settings.appearance.custom.headingFont.label")}>
- <HeadingFontRow />
- </SettingsRow>
- <SettingsRow label={t("settings.appearance.custom.chatFont.label")}>
- <ChatFontRow />
- </SettingsRow>
- <SettingsGroupDivider />
- <SettingsRow label={t("settings.appearance.custom.contrast.label")}>
- <ContrastSliderRow />
- </SettingsRow>
- </SettingsSection>
-
{/* Nav shape first, then the profile menu inside it. */}
<div ref={sidebarNavSectionRef} className="scroll-mt-4">
<SettingsSection
diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.ts
index be436e58d83..71cec55a0f5 100644
--- a/studio/frontend/src/i18n/locales/ar.ts
+++ b/studio/frontend/src/i18n/locales/ar.ts
@@ -1288,19 +1288,20 @@ export const ar = {
title: "المظهر",
description: "كيفية ظهور Unsloth على هذا الجهاز.",
theme: {
- title: "السمة",
- label: "نظام الألوان",
+ title: "النمط المرئي",
+ label: "الوضع",
description: "فاتح أو داكن أو حسب إعداد نظامك.",
system: "النظام",
light: "فاتح",
dark: "داكن",
},
palette: {
- label: "لوحة الألوان",
+ label: "السمة",
description: "الألوان المستخدمة في Unsloth في الوضعين الفاتح والداكن.",
standard: "قياسية",
classic: "كلاسيكية",
minimal: "بسيطة",
+ moreThemes: "المزيد من السمات",
},
custom: {
chatWidth: {
@@ -1314,8 +1315,6 @@ export const ar = {
resetAll: "إعادة تعيين التخصيص",
preferencesTitle: "التفضيلات",
colors: {
- lightGroup: "المظهر الفاتح",
- darkGroup: "المظهر الداكن",
accent: "لون التمييز",
background: "الخلفية",
foreground: "اللون الأمامي",
diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.ts
index e62df06f888..d8fdc374d6a 100644
--- a/studio/frontend/src/i18n/locales/de.ts
+++ b/studio/frontend/src/i18n/locales/de.ts
@@ -1314,19 +1314,20 @@ export const de = {
title: "Darstellung",
description: "Wie Unsloth auf diesem Gerät aussieht.",
theme: {
- title: "Design",
- label: "Farbschema",
+ title: "Visueller Stil",
+ label: "Modus",
description: "Hell, dunkel oder dem System folgen.",
system: "System",
light: "Hell",
dark: "Dunkel",
},
palette: {
- label: "Farbpalette",
+ label: "Design",
description: "Farben, die in Unsloth im hellen und dunklen Modus verwendet werden.",
standard: "Standard",
classic: "Klassisch",
minimal: "Minimal",
+ moreThemes: "Weitere Designs",
},
custom: {
chatWidth: {
@@ -1340,8 +1341,6 @@ export const de = {
resetAll: "Anpassungen zurücksetzen",
preferencesTitle: "Weitere Optionen",
colors: {
- lightGroup: "Helles Design",
- darkGroup: "Dunkles Design",
accent: "Akzentfarbe",
background: "Hintergrund",
foreground: "Vordergrund",
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index 35b388c1d14..f41bd9b53a4 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -1289,19 +1289,20 @@ export const en = {
title: "Appearance",
description: "How Unsloth looks on this device.",
theme: {
- title: "Theme",
- label: "Color scheme",
+ title: "Visual style",
+ label: "Mode",
description: "Light, dark, or follow your system.",
system: "System",
light: "Light",
dark: "Dark",
},
palette: {
- label: "Color palette",
+ label: "Theme",
description: "Colors used across Unsloth, in light and dark mode.",
standard: "Standard",
classic: "Classic",
minimal: "Minimal",
+ moreThemes: "More themes",
},
custom: {
chatWidth: {
@@ -1315,8 +1316,6 @@ export const en = {
resetAll: "Reset customization",
preferencesTitle: "Preferences",
colors: {
- lightGroup: "Light theme",
- darkGroup: "Dark theme",
accent: "Accent",
background: "Background",
foreground: "Foreground",
diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.ts
index 82bff46c195..949330995f0 100644
--- a/studio/frontend/src/i18n/locales/es.ts
+++ b/studio/frontend/src/i18n/locales/es.ts
@@ -1309,19 +1309,20 @@ export const es = {
title: "Apariencia",
description: "Cómo se ve Unsloth en este dispositivo.",
theme: {
- title: "Tema",
- label: "Esquema de color",
+ title: "Estilo visual",
+ label: "Modo",
description: "Claro, oscuro o según tu sistema.",
system: "Sistema",
light: "Claro",
dark: "Oscuro",
},
palette: {
- label: "Paleta de colores",
+ label: "Tema",
description: "Colores usados en Unsloth, en modo claro y oscuro.",
standard: "Estándar",
classic: "Clásica",
minimal: "Minimalista",
+ moreThemes: "Más temas",
},
custom: {
chatWidth: {
@@ -1335,8 +1336,6 @@ export const es = {
resetAll: "Restablecer la personalización",
preferencesTitle: "Preferencias",
colors: {
- lightGroup: "Tema claro",
- darkGroup: "Tema oscuro",
accent: "Acento",
background: "Fondo",
foreground: "Primer plano",
diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.ts
index bc504998eeb..3ef1946d9b0 100644
--- a/studio/frontend/src/i18n/locales/fr.ts
+++ b/studio/frontend/src/i18n/locales/fr.ts
@@ -1313,19 +1313,20 @@ export const fr = {
title: "Apparence",
description: "L'apparence d'Unsloth sur cet appareil.",
theme: {
- title: "Thème",
- label: "Mode de couleur",
+ title: "Style visuel",
+ label: "Mode",
description: "Clair, sombre ou selon votre système.",
system: "Système",
light: "Clair",
dark: "Sombre",
},
palette: {
- label: "Palette",
+ label: "Thème",
description: "Couleurs utilisées dans Unsloth, en mode clair et sombre.",
standard: "Standard",
classic: "Classique",
minimal: "Minimale",
+ moreThemes: "Plus de thèmes",
},
custom: {
chatWidth: {
@@ -1339,8 +1340,6 @@ export const fr = {
resetAll: "Réinitialiser la personnalisation",
preferencesTitle: "Préférences",
colors: {
- lightGroup: "Thème clair",
- darkGroup: "Thème sombre",
accent: "Accent",
background: "Arrière-plan",
foreground: "Premier plan",
diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.ts
index da4dac2cd12..10251aac18e 100644
--- a/studio/frontend/src/i18n/locales/hi.ts
+++ b/studio/frontend/src/i18n/locales/hi.ts
@@ -1291,19 +1291,20 @@ export const hi = {
title: "रूप-रंग",
description: "इस डिवाइस पर Unsloth कैसा दिखता है।",
theme: {
- title: "थीम",
- label: "रंग योजना",
+ title: "विज़ुअल स्टाइल",
+ label: "मोड",
description: "लाइट, डार्क या सिस्टम सेटिंग के अनुसार।",
system: "सिस्टम",
light: "लाइट",
dark: "डार्क",
},
palette: {
- label: "रंग पैलेट",
+ label: "थीम",
description: "लाइट और डार्क मोड में पूरे Unsloth में दिखने वाले रंग।",
standard: "मानक",
classic: "क्लासिक",
minimal: "मिनिमल",
+ moreThemes: "और थीम",
},
custom: {
chatWidth: {
@@ -1317,8 +1318,6 @@ export const hi = {
resetAll: "कस्टमाइज़ेशन रीसेट करें",
preferencesTitle: "प्राथमिकताएं",
colors: {
- lightGroup: "लाइट थीम",
- darkGroup: "डार्क थीम",
accent: "एक्सेंट",
background: "पृष्ठभूमि",
foreground: "अग्रभूमि",
diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.ts
index 624899697f1..bedefd0029d 100644
--- a/studio/frontend/src/i18n/locales/it.ts
+++ b/studio/frontend/src/i18n/locales/it.ts
@@ -1274,19 +1274,20 @@ export const it = {
title: "Aspetto",
description: "Come si presenta Unsloth su questo dispositivo.",
theme: {
- title: "Tema",
- label: "Combinazione di colori",
+ title: "Stile visivo",
+ label: "Modalità",
description: "Chiaro, scuro o in base alle impostazioni di sistema.",
system: "Sistema",
light: "Chiaro",
dark: "Scuro",
},
palette: {
- label: "Tavolozza dei colori",
+ label: "Tema",
description: "Colori usati in Unsloth, nei temi chiaro e scuro.",
standard: "Standard",
classic: "Classica",
minimal: "Minimale",
+ moreThemes: "Altri temi",
},
custom: {
chatWidth: {
@@ -1300,8 +1301,6 @@ export const it = {
resetAll: "Ripristina la personalizzazione",
preferencesTitle: "Preferenze",
colors: {
- lightGroup: "Tema chiaro",
- darkGroup: "Tema scuro",
accent: "Accento",
background: "Sfondo",
foreground: "Primo piano",
diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.ts
index e126d2edc32..96879fdcb17 100644
--- a/studio/frontend/src/i18n/locales/ja.ts
+++ b/studio/frontend/src/i18n/locales/ja.ts
@@ -1270,19 +1270,20 @@ export const ja = {
title: "外観",
description: "このデバイスでの Unsloth の見た目。",
theme: {
- title: "テーマ",
- label: "カラー構成",
+ title: "表示スタイル",
+ label: "モード",
description: "ライト、ダーク、またはシステム設定に従います。",
system: "システム",
light: "ライト",
dark: "ダーク",
},
palette: {
- label: "カラーパレット",
+ label: "テーマ",
description: "Unsloth 全体で使用される配色。ライト・ダーク両対応。",
standard: "スタンダード",
classic: "クラシック",
minimal: "ミニマル",
+ moreThemes: "その他のテーマ",
},
custom: {
chatWidth: {
@@ -1296,8 +1297,6 @@ export const ja = {
resetAll: "カスタマイズをリセット",
preferencesTitle: "環境設定",
colors: {
- lightGroup: "ライトテーマ",
- darkGroup: "ダークテーマ",
accent: "アクセント",
background: "背景",
foreground: "文字色",
diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.ts
index 5f38b1177f5..bbcd0d0ea82 100644
--- a/studio/frontend/src/i18n/locales/ko.ts
+++ b/studio/frontend/src/i18n/locales/ko.ts
@@ -1284,19 +1284,20 @@ export const ko = {
title: "외관",
description: "이 기기에서 Unsloth가 표시되는 방식입니다.",
theme: {
- title: "테마",
- label: "색상 구성",
+ title: "시각 스타일",
+ label: "모드",
description: "라이트, 다크 또는 시스템 설정을 따릅니다.",
system: "시스템",
light: "라이트",
dark: "다크",
},
palette: {
- label: "색상 팔레트",
+ label: "테마",
description: "라이트 모드와 다크 모드에서 Unsloth 전반에 쓰이는 색상입니다.",
standard: "표준",
classic: "클래식",
minimal: "미니멀",
+ moreThemes: "더 많은 테마",
},
custom: {
chatWidth: {
@@ -1310,8 +1311,6 @@ export const ko = {
resetAll: "사용자 지정 초기화",
preferencesTitle: "환경설정",
colors: {
- lightGroup: "라이트 테마",
- darkGroup: "다크 테마",
accent: "강조색",
background: "배경",
foreground: "전경",
diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.ts
index 5fad8a5251d..793be152728 100644
--- a/studio/frontend/src/i18n/locales/pt-br.ts
+++ b/studio/frontend/src/i18n/locales/pt-br.ts
@@ -1301,19 +1301,20 @@ export const ptBR = {
title: "Aparência",
description: "A aparência do Unsloth neste dispositivo.",
theme: {
- title: "Tema",
- label: "Esquema de cores",
+ title: "Estilo visual",
+ label: "Modo",
description: "Tema claro, escuro ou o mesmo do sistema.",
system: "Sistema",
light: "Claro",
dark: "Escuro",
},
palette: {
- label: "Paleta de cores",
+ label: "Tema",
description: "Cores usadas no Unsloth, nos modos claro e escuro.",
standard: "Padrão",
classic: "Clássico",
minimal: "Minimalista",
+ moreThemes: "Mais temas",
},
custom: {
chatWidth: {
@@ -1327,8 +1328,6 @@ export const ptBR = {
resetAll: "Redefinir personalização",
preferencesTitle: "Preferências",
colors: {
- lightGroup: "Tema claro",
- darkGroup: "Tema escuro",
accent: "Destaque",
background: "Fundo",
foreground: "Texto",
diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.ts
index c6af7ea9946..3780aced766 100644
--- a/studio/frontend/src/i18n/locales/ru.ts
+++ b/studio/frontend/src/i18n/locales/ru.ts
@@ -1293,19 +1293,20 @@ export const ru = {
title: "Оформление",
description: "Как Unsloth выглядит на этом устройстве.",
theme: {
- title: "Тема",
- label: "Цветовая схема",
+ title: "Внешний вид",
+ label: "Режим",
description: "Светлая, тёмная или как в системе.",
system: "Системная",
light: "Светлая",
dark: "Тёмная",
},
palette: {
- label: "Цветовая палитра",
+ label: "Тема",
description: "Цвета, используемые в Unsloth в светлой и тёмной теме.",
standard: "Стандартная",
classic: "Классическая",
minimal: "Минималистичная",
+ moreThemes: "Другие темы",
},
custom: {
chatWidth: {
@@ -1319,8 +1320,6 @@ export const ru = {
resetAll: "Сбросить настройки оформления",
preferencesTitle: "Параметры",
colors: {
- lightGroup: "Светлая тема",
- darkGroup: "Тёмная тема",
accent: "Акцент",
background: "Фон",
foreground: "Текст",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index 8840350adb6..853a6f3c744 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -1271,19 +1271,20 @@ export const zhCN = {
autoDetect: "自动检测",
},
theme: {
- title: "主题",
- label: "颜色主题",
+ title: "视觉样式",
+ label: "模式",
description: "选择浅色、深色,或跟随系统。",
system: "跟随系统",
light: "浅色",
dark: "深色",
},
palette: {
- label: "调色板",
+ label: "主题",
description: "Unsloth 全局使用的配色,支持浅色和深色模式。",
standard: "标准",
classic: "经典",
minimal: "极简",
+ moreThemes: "更多主题",
},
custom: {
chatWidth: {
@@ -1297,8 +1298,6 @@ export const zhCN = {
resetAll: "重置自定义",
preferencesTitle: "偏好设置",
colors: {
- lightGroup: "浅色主题",
- darkGroup: "深色主题",
accent: "强调色",
background: "背景",
foreground: "前景",
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 84c9dceda9e..96a29245342 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -649,6 +649,945 @@
--sidebar-ring: #ededed;
}
+/* ---------------------------------------------------------------------------
+ Flavor themes (Theme > More themes). Each sets --th-* seeds per mode; the
+ block below maps them onto the --*-base tokens, so contrast and custom
+ colors still apply. */
+:root:where([data-palette="blueberry"], [data-palette="butterfly-pea"], [data-palette="cherry"], [data-palette="cinnamon"], [data-palette="cotton-candy"], [data-palette="dragon-fruit"], [data-palette="earl-grey"], [data-palette="espresso"], [data-palette="honey"], [data-palette="licorice"], [data-palette="macaron"], [data-palette="matcha"], [data-palette="mint"], [data-palette="neon-cyberpunk"], [data-palette="oat-milk"], [data-palette="peach"], [data-palette="pina-paraiso"], [data-palette="plum"], [data-palette="tangerine"], [data-palette="taro"], [data-palette="wasabi"], [data-palette="yuzu"])[data-palette] {
+ --background: var(--th-bg);
+ --foreground-base: var(--th-fg);
+ --card-base: var(--th-surface);
+ --card-foreground-base: var(--th-fg);
+ --popover-base: var(--th-surface);
+ --popover-foreground-base: var(--th-fg);
+ --primary: var(--th-accent);
+ --primary-foreground: var(--th-accent-fg);
+ --control-accent: var(--th-accent);
+ --control-accent-foreground: var(--th-accent-fg);
+ --secondary-base: var(--th-raised);
+ --secondary-foreground-base: var(--th-fg);
+ --muted-base: var(--th-raised);
+ --accent-base: var(--th-hover);
+ --accent-foreground-base: var(--th-fg);
+ --border-base: var(--th-border);
+ --input-base: var(--th-border);
+ --ring: var(--th-fg);
+ --chart-1: var(--th-chart-1);
+ --chart-2: var(--th-chart-2);
+ --chart-3: var(--th-chart-3);
+ --chart-4: var(--th-chart-4);
+ --chart-5: var(--th-chart-5);
+ --sidebar-base: var(--th-surface);
+ --sidebar-foreground-base: var(--th-fg);
+ --sidebar-primary: var(--th-accent);
+ --sidebar-primary-foreground: var(--th-accent-fg);
+ --sidebar-accent-base: var(--th-hover);
+ --sidebar-accent-foreground-base: var(--th-fg);
+ --sidebar-border-base: var(--th-border);
+ --sidebar-ring: var(--th-fg);
+ --tabs-line-indicator-base: var(--th-hover);
+
+ --nav-fg-base: var(--th-fg);
+ --nav-fg-muted-base: var(--th-muted);
+ --nav-surface-hover-base: var(--th-hover);
+ --nav-icon-idle-base: var(--th-subtle);
+ --nav-beta-border: var(--th-border);
+ --panel-surface-hover-base: var(--th-hover);
+ --panel-input-surface-base: color-mix(in srgb, var(--th-fg) 7%, transparent);
+ --panel-input-surface-hover-base: color-mix(in srgb, var(--th-fg) 11%, transparent);
+ --panel-surface-fg-muted: var(--th-muted);
+ --panel-slider-fg-base: var(--th-muted);
+ --chat-icon-fg-base: color-mix(in srgb, var(--th-fg) 80%, var(--th-bg));
+ --chat-icon-bg-hover-base: var(--th-hover);
+}
+
+/* Attribute specificity only, so html[data-contrast-adjust] still wins. */
+[data-palette]:where([data-palette="blueberry"], [data-palette="butterfly-pea"], [data-palette="cherry"], [data-palette="cinnamon"], [data-palette="cotton-candy"], [data-palette="dragon-fruit"], [data-palette="earl-grey"], [data-palette="espresso"], [data-palette="honey"], [data-palette="licorice"], [data-palette="macaron"], [data-palette="matcha"], [data-palette="mint"], [data-palette="neon-cyberpunk"], [data-palette="oat-milk"], [data-palette="peach"], [data-palette="pina-paraiso"], [data-palette="plum"], [data-palette="tangerine"], [data-palette="taro"], [data-palette="wasabi"], [data-palette="yuzu"]) {
+ --muted-foreground: var(--th-muted);
+}
+
+/* Lift the dark composer slightly; flavor cards sit close to the page. */
+:root:where([data-palette="blueberry"], [data-palette="butterfly-pea"], [data-palette="cherry"], [data-palette="cinnamon"], [data-palette="cotton-candy"], [data-palette="dragon-fruit"], [data-palette="earl-grey"], [data-palette="espresso"], [data-palette="honey"], [data-palette="licorice"], [data-palette="macaron"], [data-palette="matcha"], [data-palette="mint"], [data-palette="neon-cyberpunk"], [data-palette="oat-milk"], [data-palette="peach"], [data-palette="pina-paraiso"], [data-palette="plum"], [data-palette="tangerine"], [data-palette="taro"], [data-palette="wasabi"], [data-palette="yuzu"])[data-palette].dark
+ :is(.chat-composer-surface, .unsloth-composer-surface) {
+ background-color: color-mix(in srgb, var(--card), var(--th-fg) 4%);
+}
+
+/* Collapsed rail takes the page color, as it does in dark mode. */
+:root:where([data-palette="blueberry"], [data-palette="butterfly-pea"], [data-palette="cherry"], [data-palette="cinnamon"], [data-palette="cotton-candy"], [data-palette="dragon-fruit"], [data-palette="earl-grey"], [data-palette="espresso"], [data-palette="honey"], [data-palette="licorice"], [data-palette="macaron"], [data-palette="matcha"], [data-palette="mint"], [data-palette="neon-cyberpunk"], [data-palette="oat-milk"], [data-palette="peach"], [data-palette="pina-paraiso"], [data-palette="plum"], [data-palette="tangerine"], [data-palette="taro"], [data-palette="wasabi"], [data-palette="yuzu"])[data-palette]:not(.dark)
+ [data-collapsible="icon"] [data-sidebar="sidebar"] {
+ --sidebar-surface: var(--background);
+}
+
+/* Neon Cyberpunk light: yellow edge glow on the composer. */
+:root[data-palette="neon-cyberpunk"]:not(.dark)
+ :is(.chat-composer-surface, .unsloth-composer-surface) {
+ box-shadow:
+ 0 0 0 1px rgb(230 210 0 / 0.7),
+ 0 0 26px -6px rgb(252 238 10 / 0.8),
+ 0 2px 8px -2px rgb(0 0 0 / 0.1);
+}
+:root[data-palette="neon-cyberpunk"]:not(.dark)
+ :is(.chat-composer-surface, .unsloth-composer-surface):focus-within {
+ box-shadow:
+ 0 0 0 1px rgb(230 210 0 / 0.9),
+ 0 0 32px -4px rgb(252 238 10 / 0.9),
+ 0 2px 8px -2px rgb(0 0 0 / 0.1);
+}
+/* Neon Cyberpunk: cyan edge glow on the dark composer. */
+:root[data-palette="neon-cyberpunk"].dark
+ :is(.chat-composer-surface, .unsloth-composer-surface) {
+ box-shadow:
+ 0 0 0 1px rgb(0 240 255 / 0.35),
+ 0 0 28px -8px rgb(0 240 255 / 0.45),
+ 0 4px 20px 4px var(--background);
+}
+:root[data-palette="neon-cyberpunk"].dark
+ :is(.chat-composer-surface, .unsloth-composer-surface):focus-within {
+ box-shadow:
+ 0 0 0 1px rgb(0 240 255 / 0.6),
+ 0 0 32px -6px rgb(0 240 255 / 0.55),
+ 0 4px 20px 4px var(--background);
+}
+
+
+/* Blueberry */
+:root[data-palette="blueberry"]:not(.dark) {
+ --th-bg: #f6f7fc;
+ --th-surface: #eef0f9;
+ --th-raised: #e6e9f5;
+ --th-hover: #dde1f0;
+ --th-border: #d5daec;
+ --th-fg: #1c2140;
+ --th-muted: #4f5677;
+ --th-subtle: #8c92b0;
+ --th-accent: #4a5bdc;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #4a5bdc;
+ --th-chart-2: #1f97b8;
+ --th-chart-3: #8456d6;
+ --th-chart-4: #2e9e6c;
+ --th-chart-5: #d64a7a;
+}
+:root[data-palette="blueberry"].dark {
+ --th-bg: #141726;
+ --th-surface: #1b1f33;
+ --th-raised: #232840;
+ --th-hover: #2b314c;
+ --th-border: #323958;
+ --th-fg: #dde2f5;
+ --th-muted: #a3aacb;
+ --th-subtle: #6f779c;
+ --th-accent: #7c8cff;
+ --th-accent-fg: #10121f;
+ --th-chart-1: #7c8cff;
+ --th-chart-2: #5cc8e6;
+ --th-chart-3: #b48cff;
+ --th-chart-4: #6fd6a8;
+ --th-chart-5: #ff8fb1;
+}
+
+/* Butterfly Pea */
+:root[data-palette="butterfly-pea"]:not(.dark) {
+ --th-bg: #f4f9fd;
+ --th-surface: #e9f2fa;
+ --th-raised: #deebf6;
+ --th-hover: #d2e3f2;
+ --th-border: #c7dbee;
+ --th-fg: #0f2233;
+ --th-muted: #3f5a70;
+ --th-subtle: #7f97ab;
+ --th-accent: #0077c8;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #0077c8;
+ --th-chart-2: #d6336c;
+ --th-chart-3: #1f9e8a;
+ --th-chart-4: #c98a1e;
+ --th-chart-5: #7a4fd1;
+}
+:root[data-palette="butterfly-pea"].dark {
+ --th-bg: #0f1520;
+ --th-surface: #141c2a;
+ --th-raised: #1a2434;
+ --th-hover: #212c3f;
+ --th-border: #283449;
+ --th-fg: #dcebf8;
+ --th-muted: #9fb8cf;
+ --th-subtle: #6a8399;
+ --th-accent: #38b6ff;
+ --th-accent-fg: #07121d;
+ --th-chart-1: #38b6ff;
+ --th-chart-2: #ff5c8a;
+ --th-chart-3: #5fe0c0;
+ --th-chart-4: #ffc85c;
+ --th-chart-5: #b08cff;
+}
+
+/* Cherry Cola */
+:root[data-palette="cherry"]:not(.dark) {
+ --th-bg: #fdf6f6;
+ --th-surface: #f9ebeb;
+ --th-raised: #f4e0e0;
+ --th-hover: #eed4d4;
+ --th-border: #e8c9c9;
+ --th-fg: #300f12;
+ --th-muted: #6e4144;
+ --th-subtle: #a67f82;
+ --th-accent: #c8102e;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #c8102e;
+ --th-chart-2: #e0782e;
+ --th-chart-3: #2a9a6c;
+ --th-chart-4: #3f6fd1;
+ --th-chart-5: #9c4fc4;
+}
+:root[data-palette="cherry"].dark {
+ --th-bg: #1b1112;
+ --th-surface: #241718;
+ --th-raised: #2d1d1f;
+ --th-hover: #372426;
+ --th-border: #402a2d;
+ --th-fg: #f4dfe0;
+ --th-muted: #c49ea1;
+ --th-subtle: #8e6a6d;
+ --th-accent: #ff4d5e;
+ --th-accent-fg: #1b0508;
+ --th-chart-1: #ff4d5e;
+ --th-chart-2: #ffa06b;
+ --th-chart-3: #7fd1a0;
+ --th-chart-4: #7fb0f0;
+ --th-chart-5: #d99af0;
+}
+
+/* Cinnamon */
+:root[data-palette="cinnamon"]:not(.dark) {
+ --th-bg: #fcf7f4;
+ --th-surface: #f6ece6;
+ --th-raised: #f0e1d9;
+ --th-hover: #e9d5cb;
+ --th-border: #e2cabe;
+ --th-fg: #2e1a12;
+ --th-muted: #6b4d40;
+ --th-subtle: #a3877a;
+ --th-accent: #a8461f;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #a8461f;
+ --th-chart-2: #c98a1e;
+ --th-chart-3: #5f8a4a;
+ --th-chart-4: #3f73a8;
+ --th-chart-5: #9a4f86;
+}
+:root[data-palette="cinnamon"].dark {
+ --th-bg: #1b1411;
+ --th-surface: #241b17;
+ --th-raised: #2d221d;
+ --th-hover: #372a24;
+ --th-border: #40312a;
+ --th-fg: #f0e1d8;
+ --th-muted: #c0a597;
+ --th-subtle: #8b7063;
+ --th-accent: #e8804f;
+ --th-accent-fg: #1b0c05;
+ --th-chart-1: #e8804f;
+ --th-chart-2: #e8c05a;
+ --th-chart-3: #9cc47f;
+ --th-chart-4: #7faee0;
+ --th-chart-5: #d69ac4;
+}
+
+/* Cotton Candy */
+:root[data-palette="cotton-candy"]:not(.dark) {
+ --th-bg: #fdf8fb;
+ --th-surface: #f7eef6;
+ --th-raised: #f1e4f0;
+ --th-hover: #eadaea;
+ --th-border: #e4d0e4;
+ --th-fg: #2a1830;
+ --th-muted: #65496b;
+ --th-subtle: #a288a6;
+ --th-accent: #c2378f;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #c2378f;
+ --th-chart-2: #3f9ae0;
+ --th-chart-3: #9c5cd6;
+ --th-chart-4: #2aa38a;
+ --th-chart-5: #e0892e;
+}
+:root[data-palette="cotton-candy"].dark {
+ --th-bg: #1a1420;
+ --th-surface: #221a29;
+ --th-raised: #2a2133;
+ --th-hover: #33283e;
+ --th-border: #3c2f48;
+ --th-fg: #f5e4f4;
+ --th-muted: #c4a6c8;
+ --th-subtle: #8d7093;
+ --th-accent: #ff8fd0;
+ --th-accent-fg: #1f0a1a;
+ --th-chart-1: #ff8fd0;
+ --th-chart-2: #8fd0ff;
+ --th-chart-3: #c8a0ff;
+ --th-chart-4: #8fe8c8;
+ --th-chart-5: #ffd08f;
+}
+
+/* Dragon Fruit */
+:root[data-palette="dragon-fruit"]:not(.dark) {
+ --th-bg: #fdf6fa;
+ --th-surface: #f8eaf3;
+ --th-raised: #f3deec;
+ --th-hover: #edd2e5;
+ --th-border: #e7c6dd;
+ --th-fg: #300c24;
+ --th-muted: #6e3d5d;
+ --th-subtle: #a67d98;
+ --th-accent: #c2127f;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #c2127f;
+ --th-chart-2: #5a9a1f;
+ --th-chart-3: #e0782e;
+ --th-chart-4: #3f6fd1;
+ --th-chart-5: #8a3fd1;
+}
+:root[data-palette="dragon-fruit"].dark {
+ --th-bg: #1c0f18;
+ --th-surface: #261420;
+ --th-raised: #301a29;
+ --th-hover: #3a2032;
+ --th-border: #44263b;
+ --th-fg: #f8e0ef;
+ --th-muted: #c89db8;
+ --th-subtle: #926682;
+ --th-accent: #ff3da8;
+ --th-accent-fg: #1c0512;
+ --th-chart-1: #ff3da8;
+ --th-chart-2: #9ae65a;
+ --th-chart-3: #ffb36b;
+ --th-chart-4: #7fb0ff;
+ --th-chart-5: #c890ff;
+}
+
+/* Earl Grey */
+:root[data-palette="earl-grey"]:not(.dark) {
+ --th-bg: #f6f7f9;
+ --th-surface: #eceff3;
+ --th-raised: #e3e7ec;
+ --th-hover: #d9dee5;
+ --th-border: #cfd5de;
+ --th-fg: #1c2129;
+ --th-muted: #4c5563;
+ --th-subtle: #8a93a0;
+ --th-accent: #4f6b8a;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #4f6b8a;
+ --th-chart-2: #8a6f9c;
+ --th-chart-3: #5f8f7a;
+ --th-chart-4: #b08a4f;
+ --th-chart-5: #a85f6b;
+}
+:root[data-palette="earl-grey"].dark {
+ --th-bg: #15171b;
+ --th-surface: #1c1f24;
+ --th-raised: #23272d;
+ --th-hover: #2b3037;
+ --th-border: #333840;
+ --th-fg: #e2e6ec;
+ --th-muted: #a8b0bc;
+ --th-subtle: #747c88;
+ --th-accent: #9db4cf;
+ --th-accent-fg: #11161c;
+ --th-chart-1: #9db4cf;
+ --th-chart-2: #c3a8d6;
+ --th-chart-3: #9fcfb8;
+ --th-chart-4: #e0c39a;
+ --th-chart-5: #e0a3ab;
+}
+
+/* Espresso Amore */
+:root[data-palette="espresso"]:not(.dark) {
+ --th-bg: #faf6f2;
+ --th-surface: #f3ece5;
+ --th-raised: #ece3da;
+ --th-hover: #e5d9cd;
+ --th-border: #dfd2c4;
+ --th-fg: #2b201a;
+ --th-muted: #6b584c;
+ --th-subtle: #a08c7e;
+ --th-accent: #8a5a33;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #8a5a33;
+ --th-chart-2: #c07a3e;
+ --th-chart-3: #b8903a;
+ --th-chart-4: #5f8a6c;
+ --th-chart-5: #a8574a;
+}
+:root[data-palette="espresso"].dark {
+ --th-bg: #1c1613;
+ --th-surface: #251d19;
+ --th-raised: #2e2520;
+ --th-hover: #382d27;
+ --th-border: #40342d;
+ --th-fg: #eadfd6;
+ --th-muted: #b8a79a;
+ --th-subtle: #85746a;
+ --th-accent: #d69a5e;
+ --th-accent-fg: #1c1613;
+ --th-chart-1: #d69a5e;
+ --th-chart-2: #b5835a;
+ --th-chart-3: #e8c07d;
+ --th-chart-4: #8fb39a;
+ --th-chart-5: #c77a6a;
+}
+
+/* Honey */
+:root[data-palette="honey"]:not(.dark) {
+ --th-bg: #fdf9ef;
+ --th-surface: #f8f1de;
+ --th-raised: #f2e9d0;
+ --th-hover: #ebe0c2;
+ --th-border: #e4d8b6;
+ --th-fg: #2a2310;
+ --th-muted: #675b3c;
+ --th-subtle: #a0946f;
+ --th-accent: #c98a00;
+ --th-accent-fg: #1f1600;
+ --th-chart-1: #c98a00;
+ --th-chart-2: #c2611c;
+ --th-chart-3: #5f8f2a;
+ --th-chart-4: #2f7fb5;
+ --th-chart-5: #b4507c;
+ --primary: #b87f02;
+ --primary-foreground: #111417;
+ --sidebar-primary: #b87f02;
+ --sidebar-primary-foreground: #111417;
+ --control-accent: #b87f02;
+ --control-accent-foreground: #111417;
+}
+:root[data-palette="honey"].dark {
+ --th-bg: #1a1710;
+ --th-surface: #231f15;
+ --th-raised: #2c271a;
+ --th-hover: #362f20;
+ --th-border: #3e3725;
+ --th-fg: #f0e6cf;
+ --th-muted: #bfb193;
+ --th-subtle: #8a7e62;
+ --th-accent: #f2b631;
+ --th-accent-fg: #1a1508;
+ --th-chart-1: #f2b631;
+ --th-chart-2: #e08a2e;
+ --th-chart-3: #9fc46b;
+ --th-chart-4: #7fb2d9;
+ --th-chart-5: #d98aa8;
+}
+
+/* Licorice */
+:root[data-palette="licorice"]:not(.dark) {
+ --th-bg: #fafafa;
+ --th-surface: #f2f2f3;
+ --th-raised: #eaeaec;
+ --th-hover: #e3e3e6;
+ --th-border: #dcdce0;
+ --th-fg: #111114;
+ --th-muted: #55555f;
+ --th-subtle: #8e8e99;
+ --th-accent: #d12d34;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #d12d34;
+ --th-chart-2: #d97a1f;
+ --th-chart-3: #22955f;
+ --th-chart-4: #2d6fd1;
+ --th-chart-5: #7c4ad1;
+}
+:root[data-palette="licorice"].dark {
+ --th-bg: #0e0e10;
+ --th-surface: #16161a;
+ --th-raised: #1d1d22;
+ --th-hover: #26262c;
+ --th-border: #2e2e35;
+ --th-fg: #ececf1;
+ --th-muted: #a4a4b0;
+ --th-subtle: #6c6c78;
+ --th-accent: #e5484d;
+ --th-accent-fg: #0e0e10;
+ --th-chart-1: #e5484d;
+ --th-chart-2: #f0a04b;
+ --th-chart-3: #4cc38a;
+ --th-chart-4: #5b9df0;
+ --th-chart-5: #b07cf0;
+}
+
+/* Macaron */
+:root[data-palette="macaron"]:not(.dark) {
+ --th-bg: #fdf6f8;
+ --th-surface: #f9ecf0;
+ --th-raised: #f4e2e8;
+ --th-hover: #eed7df;
+ --th-border: #e8ccd6;
+ --th-fg: #33121d;
+ --th-muted: #704553;
+ --th-subtle: #a8818e;
+ --th-accent: #d61f55;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #d61f55;
+ --th-chart-2: #e0692e;
+ --th-chart-3: #c79a12;
+ --th-chart-4: #2a9676;
+ --th-chart-5: #5a63d6;
+}
+:root[data-palette="macaron"].dark {
+ --th-bg: #1d1216;
+ --th-surface: #26181d;
+ --th-raised: #2f1f25;
+ --th-hover: #39262d;
+ --th-border: #422c35;
+ --th-fg: #f3e0e6;
+ --th-muted: #c4a1ad;
+ --th-subtle: #8f6b78;
+ --th-accent: #ff4f7b;
+ --th-accent-fg: #1d0a10;
+ --th-chart-1: #ff4f7b;
+ --th-chart-2: #ff9f6b;
+ --th-chart-3: #ffd36b;
+ --th-chart-4: #7fd1b9;
+ --th-chart-5: #9fa8ff;
+}
+
+/* Matcha */
+:root[data-palette="matcha"]:not(.dark) {
+ --th-bg: #f6f8f1;
+ --th-surface: #eef2e6;
+ --th-raised: #e5ebda;
+ --th-hover: #dce4cf;
+ --th-border: #d3dcc4;
+ --th-fg: #1d2618;
+ --th-muted: #4f5d47;
+ --th-subtle: #8a9782;
+ --th-accent: #437a22;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #437a22;
+ --th-chart-2: #2a8a78;
+ --th-chart-3: #a88f1e;
+ --th-chart-4: #5566c2;
+ --th-chart-5: #c2634a;
+}
+:root[data-palette="matcha"].dark {
+ --th-bg: #151a15;
+ --th-surface: #1b221b;
+ --th-raised: #222b22;
+ --th-hover: #2a352a;
+ --th-border: #313d31;
+ --th-fg: #e1ead9;
+ --th-muted: #a7b59f;
+ --th-subtle: #748270;
+ --th-accent: #8cc265;
+ --th-accent-fg: #121a0e;
+ --th-chart-1: #8cc265;
+ --th-chart-2: #5fb3a1;
+ --th-chart-3: #d6c46a;
+ --th-chart-4: #9aa7e0;
+ --th-chart-5: #e09a7a;
+}
+
+/* Mint */
+:root[data-palette="mint"]:not(.dark) {
+ --th-bg: #f3f9f7;
+ --th-surface: #e9f4f1;
+ --th-raised: #dfeeea;
+ --th-hover: #d5e8e3;
+ --th-border: #cce1db;
+ --th-fg: #12302a;
+ --th-muted: #44645d;
+ --th-subtle: #7e9c95;
+ --th-accent: #0f9e80;
+ --th-accent-fg: #06201b;
+ --th-chart-1: #0f9e80;
+ --th-chart-2: #2f7fd6;
+ --th-chart-3: #7da21e;
+ --th-chart-4: #d9822b;
+ --th-chart-5: #c24f8a;
+ --primary: #0f9b7e;
+ --primary-foreground: #111417;
+ --sidebar-primary: #0f9b7e;
+ --sidebar-primary-foreground: #111417;
+ --control-accent: #0f9b7e;
+ --control-accent-foreground: #111417;
+}
+:root[data-palette="mint"].dark {
+ --th-bg: #111b1a;
+ --th-surface: #172322;
+ --th-raised: #1d2c2a;
+ --th-hover: #243633;
+ --th-border: #2b3f3c;
+ --th-fg: #dcefeb;
+ --th-muted: #9dbab4;
+ --th-subtle: #6a8883;
+ --th-accent: #4fd1b3;
+ --th-accent-fg: #0b1a17;
+ --th-chart-1: #4fd1b3;
+ --th-chart-2: #6aa9f2;
+ --th-chart-3: #c5e173;
+ --th-chart-4: #f2b36a;
+ --th-chart-5: #e88ab8;
+}
+
+/* Neon Cyberpunk */
+:root[data-palette="neon-cyberpunk"]:not(.dark) {
+ --th-bg: #f0fbfc;
+ --th-surface: #e2f6f8;
+ --th-raised: #d4eff3;
+ --th-hover: #c6e8ed;
+ --th-border: #9fdce4;
+ --th-fg: #0a0a0f;
+ --th-muted: #2f525b;
+ --th-subtle: #6a959e;
+ --th-accent: #0a0a0f;
+ --th-accent-fg: #fcee0a;
+ --th-chart-1: #0a0a0f;
+ --th-chart-2: #00a8b5;
+ --th-chart-3: #d1004b;
+ --th-chart-4: #5b1fd1;
+ --th-chart-5: #b8a200;
+ --ring: #008c99;
+ --sidebar-ring: #008c99;
+ --control-accent: #0498a3;
+ --control-accent-foreground: #111417;
+ --nav-icon-idle-base: #1f8a96;
+}
+:root[data-palette="neon-cyberpunk"].dark {
+ --th-bg: #070b14;
+ --th-surface: #0d1424;
+ --th-raised: #121b30;
+ --th-hover: #0f2b3b;
+ --th-border: #21506a;
+ --th-fg: #eafcff;
+ --th-muted: #7fdbe6;
+ --th-subtle: #4f8a96;
+ --th-accent: #fcee0a;
+ --th-accent-fg: #070b14;
+ --th-chart-1: #fcee0a;
+ --th-chart-2: #00f0ff;
+ --th-chart-3: #ff2a6d;
+ --th-chart-4: #b026ff;
+ --th-chart-5: #05ffa1;
+ --ring: #00f0ff;
+ --sidebar-ring: #00f0ff;
+ --control-accent: #00f0ff;
+ --control-accent-foreground: #070b14;
+ --nav-icon-idle-base: #3fb8c6;
+}
+
+/* Oat */
+:root[data-palette="oat-milk"]:not(.dark) {
+ --th-bg: #fbf8f3;
+ --th-surface: #f4efe7;
+ --th-raised: #ede6db;
+ --th-hover: #e6ddcf;
+ --th-border: #dfd5c6;
+ --th-fg: #2e2921;
+ --th-muted: #6a6152;
+ --th-subtle: #a19886;
+ --th-accent: #86683f;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #86683f;
+ --th-chart-2: #6f8d64;
+ --th-chart-3: #5d7c9e;
+ --th-chart-4: #a8685a;
+ --th-chart-5: #8a6f9e;
+}
+:root[data-palette="oat-milk"].dark {
+ --th-bg: #1d1b18;
+ --th-surface: #25221e;
+ --th-raised: #2d2a25;
+ --th-hover: #36322c;
+ --th-border: #3e3a33;
+ --th-fg: #ece6dc;
+ --th-muted: #b3aa9c;
+ --th-subtle: #7f776b;
+ --th-accent: #d9b98c;
+ --th-accent-fg: #1d1b18;
+ --th-chart-1: #d9b98c;
+ --th-chart-2: #a3b89a;
+ --th-chart-3: #9fb3c9;
+ --th-chart-4: #c99a8c;
+ --th-chart-5: #b8a3c9;
+}
+
+/* Peach */
+:root[data-palette="peach"]:not(.dark) {
+ --th-bg: #fdf7f3;
+ --th-surface: #f9eee7;
+ --th-raised: #f4e4db;
+ --th-hover: #eed9ce;
+ --th-border: #e8cfc2;
+ --th-fg: #33211a;
+ --th-muted: #6f5247;
+ --th-subtle: #a88b80;
+ --th-accent: #e0703d;
+ --th-accent-fg: #1f0f08;
+ --th-chart-1: #e0703d;
+ --th-chart-2: #e0a02e;
+ --th-chart-3: #3a9a74;
+ --th-chart-4: #3f7fc9;
+ --th-chart-5: #a45cc4;
+ --primary: #d56b3b;
+ --primary-foreground: #111417;
+ --sidebar-primary: #d56b3b;
+ --sidebar-primary-foreground: #111417;
+ --control-accent: #d56b3b;
+ --control-accent-foreground: #111417;
+}
+:root[data-palette="peach"].dark {
+ --th-bg: #1c1614;
+ --th-surface: #251d1a;
+ --th-raised: #2e2521;
+ --th-hover: #382c28;
+ --th-border: #41342f;
+ --th-fg: #f2e4dc;
+ --th-muted: #c2a99e;
+ --th-subtle: #8d7369;
+ --th-accent: #ffa07a;
+ --th-accent-fg: #1c0f0a;
+ --th-chart-1: #ffa07a;
+ --th-chart-2: #ffc97a;
+ --th-chart-3: #8fd0b0;
+ --th-chart-4: #7fb0e8;
+ --th-chart-5: #d69ae0;
+}
+
+/* Piña Paraíso */
+:root[data-palette="pina-paraiso"]:not(.dark) {
+ --th-bg: #fffcf0;
+ --th-surface: #fbf5df;
+ --th-raised: #f5edcf;
+ --th-hover: #eee4c0;
+ --th-border: #e7dab0;
+ --th-fg: #2c2410;
+ --th-muted: #675a36;
+ --th-subtle: #a29466;
+ --th-accent: #f2b800;
+ --th-accent-fg: #2b1d00;
+ --th-chart-1: #e0a800;
+ --th-chart-2: #1f9e8a;
+ --th-chart-3: #e0663a;
+ --th-chart-4: #7a9a1f;
+ --th-chart-5: #c2508c;
+ --primary: #af8605;
+ --primary-foreground: #111417;
+ --sidebar-primary: #af8605;
+ --sidebar-primary-foreground: #111417;
+ --control-accent: #af8605;
+ --control-accent-foreground: #111417;
+}
+:root[data-palette="pina-paraiso"].dark {
+ --th-bg: #17150c;
+ --th-surface: #201d11;
+ --th-raised: #2a2616;
+ --th-hover: #34301c;
+ --th-border: #3d3822;
+ --th-fg: #f6efd6;
+ --th-muted: #c2b690;
+ --th-subtle: #8c8262;
+ --th-accent: #ffd23f;
+ --th-accent-fg: #1c1606;
+ --th-chart-1: #ffd23f;
+ --th-chart-2: #4fd1b3;
+ --th-chart-3: #ff8a5c;
+ --th-chart-4: #b5d65a;
+ --th-chart-5: #e88ab8;
+}
+
+/* Plum Praline */
+:root[data-palette="plum"]:not(.dark) {
+ --th-bg: #fbf7fd;
+ --th-surface: #f4ecf8;
+ --th-raised: #ece2f3;
+ --th-hover: #e4d7ee;
+ --th-border: #dccde8;
+ --th-fg: #2a1836;
+ --th-muted: #634b74;
+ --th-subtle: #9d86ad;
+ --th-accent: #8b3fd1;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #8b3fd1;
+ --th-chart-2: #d13f8b;
+ --th-chart-3: #2a9a86;
+ --th-chart-4: #c98a1e;
+ --th-chart-5: #3f6fd1;
+}
+:root[data-palette="plum"].dark {
+ --th-bg: #1a1320;
+ --th-surface: #22192a;
+ --th-raised: #2a2034;
+ --th-hover: #33273f;
+ --th-border: #3b2d48;
+ --th-fg: #eadff2;
+ --th-muted: #b7a3c6;
+ --th-subtle: #836f93;
+ --th-accent: #c77dff;
+ --th-accent-fg: #1a0f24;
+ --th-chart-1: #c77dff;
+ --th-chart-2: #ff7eb6;
+ --th-chart-3: #7fd4c1;
+ --th-chart-4: #ffc46b;
+ --th-chart-5: #7aa7ff;
+}
+
+/* Tangerine Dreams */
+:root[data-palette="tangerine"]:not(.dark) {
+ --th-bg: #fdf8f3;
+ --th-surface: #f9efe5;
+ --th-raised: #f4e6d8;
+ --th-hover: #eedccb;
+ --th-border: #e8d2bf;
+ --th-fg: #2f1f10;
+ --th-muted: #6e5540;
+ --th-subtle: #a88d75;
+ --th-accent: #e36a00;
+ --th-accent-fg: #1f1206;
+ --th-chart-1: #e36a00;
+ --th-chart-2: #e0a800;
+ --th-chart-3: #3f9a5a;
+ --th-chart-4: #2f86c9;
+ --th-chart-5: #c2508a;
+ --primary: #db6701;
+ --primary-foreground: #111417;
+ --sidebar-primary: #db6701;
+ --sidebar-primary-foreground: #111417;
+ --control-accent: #db6701;
+ --control-accent-foreground: #111417;
+}
+:root[data-palette="tangerine"].dark {
+ --th-bg: #1b1510;
+ --th-surface: #241c15;
+ --th-raised: #2d231a;
+ --th-hover: #372b20;
+ --th-border: #403226;
+ --th-fg: #f3e5d6;
+ --th-muted: #c3aa91;
+ --th-subtle: #8e7560;
+ --th-accent: #ff8c2b;
+ --th-accent-fg: #1b0e03;
+ --th-chart-1: #ff8c2b;
+ --th-chart-2: #ffc94d;
+ --th-chart-3: #7cc98f;
+ --th-chart-4: #6fb2e6;
+ --th-chart-5: #e889b0;
+}
+
+/* Ube Chiffon */
+:root[data-palette="taro"]:not(.dark) {
+ --th-bg: #f9f7fc;
+ --th-surface: #f1edf8;
+ --th-raised: #e9e3f3;
+ --th-hover: #e0d9ee;
+ --th-border: #d8cfe8;
+ --th-fg: #241d33;
+ --th-muted: #5a4f70;
+ --th-subtle: #9588ab;
+ --th-accent: #7b5fc4;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #7b5fc4;
+ --th-chart-2: #c45f9e;
+ --th-chart-3: #3f9a8a;
+ --th-chart-4: #c9921e;
+ --th-chart-5: #4f7fd1;
+}
+:root[data-palette="taro"].dark {
+ --th-bg: #17141f;
+ --th-surface: #1e1a28;
+ --th-raised: #262131;
+ --th-hover: #2e283b;
+ --th-border: #362f45;
+ --th-fg: #e6e0f2;
+ --th-muted: #b0a6c6;
+ --th-subtle: #7b7192;
+ --th-accent: #b69cf0;
+ --th-accent-fg: #15101f;
+ --th-chart-1: #b69cf0;
+ --th-chart-2: #f09cc8;
+ --th-chart-3: #8fdcc8;
+ --th-chart-4: #f0cc8a;
+ --th-chart-5: #9cbcf0;
+}
+
+/* Lime */
+:root[data-palette="wasabi"]:not(.dark) {
+ --th-bg: #f8faf2;
+ --th-surface: #eef3e3;
+ --th-raised: #e5ecd5;
+ --th-hover: #dbe4c7;
+ --th-border: #d2dcba;
+ --th-fg: #1a2410;
+ --th-muted: #4c5a3c;
+ --th-subtle: #899878;
+ --th-accent: #4f7d00;
+ --th-accent-fg: #ffffff;
+ --th-chart-1: #4f7d00;
+ --th-chart-2: #1f8f8f;
+ --th-chart-3: #b58f00;
+ --th-chart-4: #5a5fd1;
+ --th-chart-5: #c4533a;
+}
+:root[data-palette="wasabi"].dark {
+ --th-bg: #121710;
+ --th-surface: #181f15;
+ --th-raised: #1f281b;
+ --th-hover: #263222;
+ --th-border: #2d3b28;
+ --th-fg: #e3eed8;
+ --th-muted: #a8b89a;
+ --th-subtle: #728465;
+ --th-accent: #b4e33d;
+ --th-accent-fg: #111a05;
+ --th-chart-1: #b4e33d;
+ --th-chart-2: #4fd1c5;
+ --th-chart-3: #f2d43d;
+ --th-chart-4: #9aa8ff;
+ --th-chart-5: #ff8f6b;
+}
+
+/* Yuzu */
+:root[data-palette="yuzu"]:not(.dark) {
+ --th-bg: #fcfcf2;
+ --th-surface: #f5f6e4;
+ --th-raised: #eef0d7;
+ --th-hover: #e6e9ca;
+ --th-border: #dfe3bf;
+ --th-fg: #22260f;
+ --th-muted: #585e3b;
+ --th-subtle: #959b77;
+ --th-accent: #d4c400;
+ --th-accent-fg: #1f1d00;
+ --th-chart-1: #bfae00;
+ --th-chart-2: #6a9a1f;
+ --th-chart-3: #2e8fb3;
+ --th-chart-4: #d9782a;
+ --th-chart-5: #9c5cc4;
+ --primary: #998f05;
+ --primary-foreground: #111417;
+ --sidebar-primary: #998f05;
+ --sidebar-primary-foreground: #111417;
+ --control-accent: #998f05;
+ --control-accent-foreground: #111417;
+}
+:root[data-palette="yuzu"].dark {
+ --th-bg: #16170f;
+ --th-surface: #1e2015;
+ --th-raised: #26291b;
+ --th-hover: #2f3322;
+ --th-border: #383c28;
+ --th-fg: #eeefd8;
+ --th-muted: #b5b99a;
+ --th-subtle: #7f8466;
+ --th-accent: #e8dd3a;
+ --th-accent-fg: #16170f;
+ --th-chart-1: #e8dd3a;
+ --th-chart-2: #a6d65a;
+ --th-chart-3: #6ec3e0;
+ --th-chart-4: #f2a65a;
+ --th-chart-5: #c79ae6;
+}
+
/* ---------------------------------------------------------------------------
Appearance customization hooks (Settings → Appearance).
@@ -929,40 +1868,6 @@ html[data-chat-font] .aui-root {
font-family: var(--custom-chat-font);
}
-/* Palette cards: the active ring keys off html[data-palette] so it swaps
- in the same style pass that swaps the color tokens. Driving it from
- React state paints one frame late while the whole page recalculates,
- which briefly leaves the ring on the previous card. */
-
-/* Dark mode drops the resting border. Same specificity as, and before, the
- hover/selected rules below so those still paint a visible border. */
-.dark .palette-card {
- border-color: transparent;
-}
-
-/* The card removes its outline, so the border is the only focus indicator.
- This rule is unlayered like the one above, which would otherwise beat
- Tailwind's layered focus-visible:border-ring and leave nothing visible. */
-.dark .palette-card:focus-visible {
- border-color: var(--ring);
-}
-
-.palette-card:hover {
- border-color: var(--ring-soft);
-}
-:root:not([data-palette]) .palette-card[data-palette-value="standard"],
-:root[data-palette="classic"] .palette-card[data-palette-value="classic"],
-:root[data-palette="minimal"] .palette-card[data-palette-value="minimal"],
-.reload-snapshot-shell:not([data-palette])
- .palette-card[data-palette-value="standard"],
-.reload-snapshot-shell[data-palette="classic"]
- .palette-card[data-palette-value="classic"],
-.reload-snapshot-shell[data-palette="minimal"]
- .palette-card[data-palette-value="minimal"] {
- /* Selection keeps the card's own border weight, only darker. */
- border-color: var(--ring-select);
-}
-
/* Settings search: brief highlight on the row a result jumped to. */
.settings-search-hit {
animation: settings-search-hit 1.6s ease-out;
diff --git a/studio/frontend/tests/color-themes.test.ts b/studio/frontend/tests/color-themes.test.ts
new file mode 100644
index 00000000000..a7f914a26f5
--- /dev/null
+++ b/studio/frontend/tests/color-themes.test.ts
@@ -0,0 +1,122 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import test from "node:test";
+
+import {
+ COLOR_THEMES,
+ COLOR_THEME_IDS,
+ FLAVOR_THEME_IDS,
+ isColorThemeId,
+} from "../src/features/settings/lib/color-themes.ts";
+
+const read = (path: string) =>
+ readFileSync(new URL(path, import.meta.url), "utf8");
+
+const indexCss = read("../src/index.css");
+const themeBoot = read("../public/theme-boot.js");
+const backendSettings = read("../../backend/routes/settings.py");
+
+test("every non-standard theme is applied by the boot script", () => {
+ for (const id of COLOR_THEME_IDS) {
+ if (id === "standard") continue;
+ assert.match(themeBoot, new RegExp(`"${id}"`), id);
+ }
+});
+
+test("the backend accepts every theme id", () => {
+ const literal = backendSettings.match(/palette: Literal\[([\s\S]*?)\]/);
+ assert.ok(literal);
+ const accepted = [...literal[1].matchAll(/"([^"]+)"/g)].map((m) => m[1]);
+ assert.deepEqual([...accepted].sort(), [...COLOR_THEME_IDS].sort());
+});
+
+test("every flavor theme has light and dark seed blocks", () => {
+ for (const id of FLAVOR_THEME_IDS) {
+ assert.ok(
+ indexCss.includes(`:root[data-palette="${id}"]:not(.dark) {`),
+ `${id} light`,
+ );
+ assert.ok(
+ indexCss.includes(`:root[data-palette="${id}"].dark {`),
+ `${id} dark`,
+ );
+ assert.ok(
+ indexCss.includes(`[data-palette="${id}"],`) ||
+ indexCss.includes(`[data-palette="${id}"])`),
+ `${id} mapping`,
+ );
+ }
+});
+
+test("every theme id has registry colors", () => {
+ assert.deepEqual(
+ Object.keys(COLOR_THEMES).sort(),
+ [...COLOR_THEME_IDS].sort(),
+ );
+});
+
+test("isColorThemeId rejects unknown values", () => {
+ assert.equal(isColorThemeId("matcha"), true);
+ assert.equal(isColorThemeId("dracula"), false);
+ assert.equal(isColorThemeId(null), false);
+});
+
+function luminance(hex: string): number {
+ const channel = (i: number) => {
+ const c = Number.parseInt(hex.slice(i, i + 2), 16) / 255;
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
+ };
+ return 0.2126 * channel(1) + 0.7152 * channel(3) + 0.0722 * channel(5);
+}
+
+function ratio(a: string, b: string): number {
+ const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x) as [
+ number,
+ number,
+ ];
+ return (hi + 0.05) / (lo + 0.05);
+}
+
+function mix(hex: string, target: string, amount: number): string {
+ const channel = (i: number) => {
+ const from = Number.parseInt(hex.slice(i, i + 2), 16);
+ const to = Number.parseInt(target.slice(i, i + 2), 16);
+ return Math.round(from + (to - from) * amount)
+ .toString(16)
+ .padStart(2, "0");
+ };
+ return `#${channel(1)}${channel(3)}${channel(5)}`;
+}
+
+// text-primary and text-control-accent paint these on the page, so they share
+// the applier's 2.5:1 accent-text floor, plain and on a 20% wash.
+test("flavor accents used as text meet the accent-text floor", () => {
+ for (const id of FLAVOR_THEME_IDS) {
+ for (const [mode, selector] of [
+ ["light", `:root[data-palette="${id}"]:not(.dark) {`],
+ ["dark", `:root[data-palette="${id}"].dark {`],
+ ] as const) {
+ const start = indexCss.indexOf(selector);
+ assert.ok(start >= 0, `${id} ${mode} block`);
+ const block = indexCss.slice(start, indexCss.indexOf("}", start));
+ const token = (name: string) =>
+ block.match(new RegExp(`\\s${name}: (#[0-9a-f]{6});`))?.[1];
+ const page = token("--th-bg");
+ const surface = token("--th-surface");
+ const accent = token("--th-accent");
+ assert.ok(page && surface && accent, `${id} ${mode} seeds`);
+ for (const name of ["--primary", "--control-accent"]) {
+ const color = token(name) ?? accent;
+ for (const plane of [page, surface, mix(surface, color, 0.2)]) {
+ assert.ok(
+ ratio(color, plane) >= 2.5,
+ `${id} ${mode} ${name} ${color} is ${ratio(color, plane).toFixed(2)}:1 on ${plane}`,
+ );
+ }
+ }
+ }
+ }
+});
diff --git a/studio/frontend/tests/flavor-accent-surfaces.test.ts b/studio/frontend/tests/flavor-accent-surfaces.test.ts
new file mode 100644
index 00000000000..bf3d0ae46a3
--- /dev/null
+++ b/studio/frontend/tests/flavor-accent-surfaces.test.ts
@@ -0,0 +1,83 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import assert from "node:assert/strict";
+import test from "node:test";
+
+const vars = new Map<string, string>();
+(globalThis as { document?: unknown }).document = {
+ documentElement: {
+ style: {
+ setProperty: (name: string, value: string) => vars.set(name, value),
+ removeProperty: (name: string) => vars.delete(name),
+ },
+ setAttribute: () => undefined,
+ removeAttribute: () => undefined,
+ toggleAttribute: () => undefined,
+ classList: { toggle: () => undefined },
+ },
+};
+
+const { applyCustomizationToDocument, DEFAULT_CUSTOMIZATION } = await import(
+ "../src/features/settings/stores/appearance-custom-store.ts"
+);
+const { COLOR_THEMES, FLAVOR_THEME_IDS } = await import(
+ "../src/features/settings/lib/color-themes.ts"
+);
+
+function luminance(hex: string): number {
+ const channel = (i: number) => {
+ const c = Number.parseInt(hex.slice(i, i + 2), 16) / 255;
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
+ };
+ return 0.2126 * channel(1) + 0.7152 * channel(3) + 0.0722 * channel(5);
+}
+
+function mix(hex: string, target: string, amount: number): string {
+ const channel = (i: number) => {
+ const from = Number.parseInt(hex.slice(i, i + 2), 16);
+ const to = Number.parseInt(target.slice(i, i + 2), 16);
+ return Math.round(from + (to - from) * amount)
+ .toString(16)
+ .padStart(2, "0");
+ };
+ return `#${channel(1)}${channel(3)}${channel(5)}`;
+}
+
+function ratio(a: string, b: string): number {
+ const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x) as [
+ number,
+ number,
+ ];
+ return (hi + 0.05) / (lo + 0.05);
+}
+
+const withAccent = (accent: string) => ({
+ ...DEFAULT_CUSTOMIZATION,
+ colors: {
+ light: { ...DEFAULT_CUSTOMIZATION.colors.light, accent },
+ dark: { ...DEFAULT_CUSTOMIZATION.colors.dark, accent },
+ },
+});
+
+// Corrected against white alone, #aaaa33 fell to 2.14:1 on Neon Cyberpunk's
+// light card wash.
+test("custom accents stay readable on each flavor theme's own surfaces", () => {
+ for (const id of FLAVOR_THEME_IDS) {
+ for (const mode of ["light", "dark"] as const) {
+ const { background, surface } = COLOR_THEMES[id][mode];
+ assert.ok(surface, `${id} ${mode} has no surface`);
+ for (const accent of ["#aaaa33", "#22c55e", "#fde68a", "#101010"]) {
+ applyCustomizationToDocument(withAccent(accent), mode, id);
+ const corrected = vars.get("--primary") ?? "";
+ const planes = [background, surface, mix(surface, corrected, 0.2)];
+ for (const plane of planes) {
+ assert.ok(
+ ratio(corrected, plane) >= 2.5,
+ `${accent} -> ${corrected} is ${ratio(corrected, plane).toFixed(2)}:1 on ${id} ${mode} ${plane}`,
+ );
+ }
+ }
+ }
+ }
+});
diff --git a/studio/frontend/tests/reload-snapshot.test.ts b/studio/frontend/tests/reload-snapshot.test.ts
index fa42b13b5e0..5c783d3ad3f 100644
--- a/studio/frontend/tests/reload-snapshot.test.ts
+++ b/studio/frontend/tests/reload-snapshot.test.ts
@@ -1041,21 +1041,6 @@ test("carries the appearance customization so the shell paints in its own colors
);
});
-test("adapts root-scoped palette state to the snapshot shell", () => {
- assert.match(
- indexCss,
- /\.reload-snapshot-shell:not\(\[data-palette\]\)[\s\S]*?\.palette-card\[data-palette-value="standard"\]/,
- );
- assert.match(
- indexCss,
- /\.reload-snapshot-shell\[data-palette="classic"\][\s\S]*?\.palette-card\[data-palette-value="classic"\]/,
- );
- assert.match(
- indexCss,
- /\.reload-snapshot-shell\[data-palette="minimal"\][\s\S]*?\.palette-card\[data-palette-value="minimal"\]/,
- );
-});
-
test("loads selected imported fonts before revealing the shell", async () => {
const persistedAppearance = new Map([
[
diff --git a/tests/studio/test_personalization_unknown_palette.py b/tests/studio/test_personalization_unknown_palette.py
new file mode 100644
index 00000000000..2913f10811e
--- /dev/null
+++ b/tests/studio/test_personalization_unknown_palette.py
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: AGPL-3.0-only
+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+"""A stored palette this build does not know must read as unset, not fail the response."""
+
+from __future__ import annotations
+
+import sys
+from pathlib import Path
+
+BACKEND = str(Path(__file__).resolve().parents[2] / "studio" / "backend")
+if BACKEND not in sys.path:
+ sys.path.insert(0, BACKEND)
+
+from utils.personalization_settings import drop_unknown_palette # noqa: E402
+
+PALETTES = frozenset({"standard", "matcha"})
+
+
+def test_unknown_palette_is_dropped_and_the_rest_kept():
+ stored = {"version": 1, "appearance": {"palette": "neon-ramen", "theme": "dark"}}
+ cleaned = drop_unknown_palette(stored, PALETTES)
+ assert cleaned["appearance"] == {"theme": "dark"}
+ assert cleaned["version"] == 1
+ # The stored record itself is left alone.
+ assert stored["appearance"]["palette"] == "neon-ramen"
+
+
+def test_known_or_missing_palette_is_untouched():
+ for stored in (
+ {"appearance": {"palette": "matcha"}},
+ {"appearance": {"theme": "light"}},
+ {"profile": {}},
+ {},
+ ):
+ assert drop_unknown_palette(stored, PALETTES) is stored
+
+
+def test_routes_read_and_answer_through_the_filter():
+ src = (Path(BACKEND) / "routes" / "settings.py").read_text()
+ assert "drop_unknown_palette(get_personalization(), _PALETTE_IDS)" in src
+ assert (
+ "PersonalizationPayload.model_validate(drop_unknown_palette(merged, _PALETTE_IDS))" in src
+ )