theme.rs, lints.rust

This commit is contained in:
Martin Kavík 2024-09-14 16:31:46 +02:00
parent ed38f24f03
commit 842341309a
3 changed files with 30 additions and 0 deletions

View file

@ -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

View file

@ -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,

24
frontend/src/theme.rs Normal file
View file

@ -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)");