From c409059dc45e0a677bd61239c35405df6f26bbd1 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 4 Jul 2023 00:41:13 -0400 Subject: [PATCH] Revert "Remove unused `color_scheme` field in the theme" This reverts commit 5a1476a1e58c43e64d051e5af9786d8edaa85088. --- crates/theme/src/theme.rs | 1 + styles/src/style_tree/app.ts | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 20f07878267c4f05448a20199ab16aef3dd8e181..e54dcdfd1e987eaf24656bc735079db54d37f0bc 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -65,6 +65,7 @@ pub struct Theme { pub assistant: AssistantStyle, pub feedback: FeedbackStyle, pub welcome: WelcomeStyle, + pub color_scheme: ColorScheme, pub titlebar: Titlebar, } diff --git a/styles/src/style_tree/app.ts b/styles/src/style_tree/app.ts index ccfdd60a981f4d5e763ce35902b0456bf0d703cd..e4bf232b624ed01f6dd1ddcd20826ab6a43aca1d 100644 --- a/styles/src/style_tree/app.ts +++ b/styles/src/style_tree/app.ts @@ -57,6 +57,21 @@ export default function app(): any { tooltip: tooltip(), terminal: terminal(), assistant: assistant(), - feedback: feedback() + feedback: feedback(), + color_scheme: { + ...theme, + players: Object.values(theme.players), + ramps: { + neutral: theme.ramps.neutral.colors(100, "hex"), + red: theme.ramps.red.colors(100, "hex"), + orange: theme.ramps.orange.colors(100, "hex"), + yellow: theme.ramps.yellow.colors(100, "hex"), + green: theme.ramps.green.colors(100, "hex"), + cyan: theme.ramps.cyan.colors(100, "hex"), + blue: theme.ramps.blue.colors(100, "hex"), + violet: theme.ramps.violet.colors(100, "hex"), + magenta: theme.ramps.magenta.colors(100, "hex"), + }, + }, } }