From acc1bf8ca32f3044fa1ba5d193de44cf264e8fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kav=C3=ADk?= Date: Sat, 14 Sep 2024 16:31:46 +0200 Subject: [PATCH] theme.rs, lints.rust --- frontend/Cargo.toml | 3 +++ frontend/src/main.rs | 3 +++ frontend/src/theme.rs | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 frontend/src/theme.rs diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 930650e..f463636 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -10,6 +10,9 @@ publish.workspace = true [dev-dependencies] wasm-bindgen-test = "0.3.19" +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(FASTWAVE_PLATFORM)'] } + [dependencies] zoon.workspace = true wellen.workspace = true diff --git a/frontend/src/main.rs b/frontend/src/main.rs index 8c45559..839cd8f 100644 --- a/frontend/src/main.rs +++ b/frontend/src/main.rs @@ -13,6 +13,9 @@ use waveform_panel::{PixiController, WaveformPanel}; mod header_panel; use header_panel::HeaderPanel; +mod theme; +use theme::*; + #[derive(Clone, Copy, Default)] enum Layout { Tree, diff --git a/frontend/src/theme.rs b/frontend/src/theme.rs new file mode 100644 index 0000000..d8fcd63 --- /dev/null +++ b/frontend/src/theme.rs @@ -0,0 +1,24 @@ +use zoon::*; + +// https://oklch.com/ + +// const COLOR_BLUE_VIOLET: Rgba = color!("BlueViolet"); // oklch(53.38% 0.25 301.37) +const COLOR_BLUE_VIOLET: Oklch = color!("oklch(53.38% 0.25 262.59)"); + +// const COLOR_MEDIUM_SLATE_BLUE: Rgba = color!("MediumSlateBlue"); // oklch(60.45% 0.194 285.5) +const COLOR_MEDIUM_SLATE_BLUE: Oklch = color!("oklch(60.45% 0.194 262.26)"); + +// const COLOR_SLATE_BLUE: Rgba = color!("SlateBlue"); // oklch(54.36% 0.171 285.54) +const COLOR_SLATE_BLUE: Oklch = color!("oklch(54.36% 0.171 262.26)"); + +// const COLOR_LIGHT_BLUE: Rgba = color!("LightBlue"); // oklch(85.62% 0.049 219.65) +const COLOR_LIGHT_BLUE: Oklch = color!("oklch(85.62% 0.049 262.26)"); + +// const COLOR_WHITE: Rgba = color!("White"); // oklch(100% 3.5594404384177905e-8 106.37411429114086) +const COLOR_WHITE: Oklch = color!("oklch(100% 3.5594404384177905e-8 105.88)"); + +// const COLOR_DARK_SLATE_BLUE: Rgba = color!("DarkSlateBlue"); // oklch(41.43% 0.125 286.04) +const COLOR_DARK_SLATE_BLUE: Oklch = color!("oklch(41.43% 0.125 262.26)"); + +// const COLOR_LAVENDER: Rgba = color!("Lavender"); // oklch(93.09% 0.027 285.86) +const COLOR_LAVENDER: Oklch = color!("oklch(93.09% 0.027 262.26)");