use canary_script::Color; /// A reusable set of colors. Used by default widget styles. pub struct Palette { pub base: Color, pub base_hover: Color, pub base_active: Color, pub surface: Color, pub overlay: Color, pub text: Color, pub black: Color, pub red: Color, pub green: Color, pub yellow: Color, pub blue: Color, pub magenta: Color, pub cyan: Color, pub white: Color, } /// Sword Art Online color palette. pub const SAO_PALETTE: Palette = Palette { base: Color::WHITE.with_alpha(0xc0), base_hover: Color::WHITE.with_alpha(0xe0), base_active: Color::YELLOW, surface: Color::WHITE, overlay: Color::WHITE, text: Color::BLACK, black: Color::BLACK, red: Color::RED, green: Color::GREEN, yellow: Color::YELLOW, blue: Color::BLUE, magenta: Color::MAGENTA, cyan: Color::CYAN, white: Color::WHITE, }; /// Rose Pine color palette. pub const ROSE_PINE_PALETTE: Palette = Palette { base: Color(0x191724c0), base_hover: Color(0x21202ee0), // Highlight Low base_active: Color(0x403d52ff), // Highlight Med surface: Color(0x1f1d2eff), overlay: Color(0x26233aff), text: Color(0xe0def4ff), black: Color(0x6e6a86ff), // Muted red: Color(0xeb6f92ff), // Love green: Color(0x7fb59fff), // ??? (not in Rose Pine?) yellow: Color(0xf6c177ff), // Gold blue: Color(0x31748fff), // Pine magenta: Color(0xc4a7e7ff), // Iris cyan: Color(0x9ccfd8ff), // Foam white: Color(0xe0def4ff), // Text }; /// Rose Pine Moon color palette. pub const ROSE_PINE_MOON_PALETTE: Palette = Palette { base: Color(0x232136c0), base_hover: Color(0x2a283ee0), // Highlight Low base_active: Color(0x44415aff), // Highlight Med surface: Color(0x2a273fff), overlay: Color(0x393552), text: Color(0xe0def4ff), black: Color(0x6e6a86ff), // Muted red: Color(0xeb6f92ff), // Love green: Color(0x7fb59fff), // ??? (not in Rose Pine?) yellow: Color(0xf6c177ff), // Gold blue: Color(0x3e8fb0ff), // Pine magenta: Color(0xc4a7e7ff), // Iris cyan: Color(0x9ccfd8ff), // Foam white: Color(0xe0def4ff), // Text }; /// Common measurements for widget shapes. pub struct Metrics { pub surface_rounding: f32, } /// Common default parameters for widget styles. pub struct Theme { pub palette: Palette, pub metrics: Metrics, } /// The global theme. pub const THEME: Theme = Theme { palette: ROSE_PINE_MOON_PALETTE, metrics: Metrics { surface_rounding: 5.0, }, };