From 81f05f00c2f1a72567b057a8ace54860223b1248 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 27 Jan 2025 01:17:45 +0100 Subject: Use `color!` macro in `Palette` definitions --- core/src/theme/palette.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'core/src/theme') diff --git a/core/src/theme/palette.rs b/core/src/theme/palette.rs index 592e0789..b69f99b1 100644 --- a/core/src/theme/palette.rs +++ b/core/src/theme/palette.rs @@ -29,20 +29,20 @@ impl Palette { pub const LIGHT: Self = Self { background: Color::WHITE, text: Color::BLACK, - primary: Color::from_rgb8(0x5E, 0x7C, 0xE2), - success: Color::from_rgb8(0x12, 0x66, 0x4F), - warning: Color::from_rgb8(0xFF, 0xC1, 0x4E), - danger: Color::from_rgb8(0xC3, 0x42, 0x3F), + primary: color!(0x5e7ce2), + success: color!(0x12664f), + warning: color!(0xffc14e), + danger: color!(0xc3423f), }; /// The built-in dark variant of a [`Palette`]. pub const DARK: Self = Self { - background: Color::from_rgb8(0x20, 0x22, 0x25), + background: color!(0x202225), text: Color::from_rgb(0.90, 0.90, 0.90), - primary: Color::from_rgb8(0x5E, 0x7C, 0xE2), - success: Color::from_rgb8(0x12, 0x66, 0x4F), - warning: Color::from_rgb8(0xFF, 0xC1, 0x4E), - danger: Color::from_rgb8(0xC3, 0x42, 0x3F), + primary: color!(0x5e7ce2), + success: color!(0x12664f), + warning: color!(0xffc14e), + danger: color!(0xc3423f), }; /// The built-in [Dracula] variant of a [`Palette`]. -- cgit