diff --git a/frontend/src/ts/components/pages/settings/custom-setting/Theme.tsx b/frontend/src/ts/components/pages/settings/custom-setting/Theme.tsx index 55138be2db30..b2274c171d0c 100644 --- a/frontend/src/ts/components/pages/settings/custom-setting/Theme.tsx +++ b/frontend/src/ts/components/pages/settings/custom-setting/Theme.tsx @@ -516,6 +516,16 @@ function ThemeButton(props: { theme: ThemeWithName }): JSXElement { function Picker(props: { color: ColorName }): JSXElement { let colorInputRef: HTMLInputElement | undefined = undefined; + const resetColor = () => { + const presetTheme = ThemesList.find( + (theme) => theme.name === getConfig.theme, + ); + const fallbackColor = getTheme()[props.color]; + const nextColor = presetTheme?.[props.color] ?? fallbackColor; + + updateThemeColor(props.color, nextColor); + }; + const text = () => { if (props.color === "bg") return "background"; if (props.color === "main") return "main"; @@ -554,7 +564,7 @@ function Picker(props: { color: ColorName }): JSXElement { return (
+