diff options
author | 2025-01-27 01:17:45 +0100 | |
---|---|---|
committer | 2025-01-27 01:17:45 +0100 | |
commit | 81f05f00c2f1a72567b057a8ace54860223b1248 (patch) | |
tree | 15864536943d2918ebc51c50956e9712323b9d0d /core/src | |
parent | ce07acf6fedd705d6380739fbc5da40f95739e04 (diff) | |
download | iced-81f05f00c2f1a72567b057a8ace54860223b1248.tar.gz iced-81f05f00c2f1a72567b057a8ace54860223b1248.tar.bz2 iced-81f05f00c2f1a72567b057a8ace54860223b1248.zip |
Use `color!` macro in `Palette` definitions
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/theme/palette.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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`]. |