diff options
author | 2024-09-25 13:10:11 +0200 | |
---|---|---|
committer | 2025-01-06 20:31:19 +0100 | |
commit | 9e2f7b2d50a39db31465ca094a53ee274e7c468f (patch) | |
tree | b03677904b7ee3a231932c660ad8b790ecf74fe8 /core/src | |
parent | e543329c79dbb8e583915b14148c757d6bfd6b38 (diff) | |
download | iced-9e2f7b2d50a39db31465ca094a53ee274e7c468f.tar.gz iced-9e2f7b2d50a39db31465ca094a53ee274e7c468f.tar.bz2 iced-9e2f7b2d50a39db31465ca094a53ee274e7c468f.zip |
Added warning field to palette and assigned colors to it in the LIGHT, DARK, DRACULA, NORD and SOLARIZED(both) themes
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/theme/palette.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/src/theme/palette.rs b/core/src/theme/palette.rs index e0ff397a..0aa904ee 100644 --- a/core/src/theme/palette.rs +++ b/core/src/theme/palette.rs @@ -19,6 +19,8 @@ pub struct Palette { pub success: Color, /// The danger [`Color`] of the [`Palette`]. pub danger: Color, + /// The warning [`Color`] of the [`Palette`]. + pub warning: Color, } impl Palette { @@ -41,6 +43,11 @@ impl Palette { 0x42 as f32 / 255.0, 0x3F as f32 / 255.0, ), + warning: Color::from_rgb( + 0xFF as f32 / 255.0, + 0xC1 as f32 / 255.0, + 0x4E as f32 / 255.0, + ), }; /// The built-in dark variant of a [`Palette`]. @@ -66,6 +73,11 @@ impl Palette { 0x42 as f32 / 255.0, 0x3F as f32 / 255.0, ), + warning: Color::from_rgb( + 0xFF as f32 / 255.0, + 0xC1 as f32 / 255.0, + 0x4E as f32 / 255.0, + ), }; /// The built-in [Dracula] variant of a [`Palette`]. @@ -77,6 +89,7 @@ impl Palette { primary: color!(0xbd93f9), // PURPLE success: color!(0x50fa7b), // GREEN danger: color!(0xff5555), // RED + warning: color!(0xf1fa8c), // YELLOW }; /// The built-in [Nord] variant of a [`Palette`]. @@ -88,6 +101,7 @@ impl Palette { primary: color!(0x8fbcbb), // nord7 success: color!(0xa3be8c), // nord14 danger: color!(0xbf616a), // nord11 + warning: color!(0xebcb8b), // nord13 }; /// The built-in [Solarized] Light variant of a [`Palette`]. @@ -99,6 +113,7 @@ impl Palette { primary: color!(0x2aa198), // cyan success: color!(0x859900), // green danger: color!(0xdc322f), // red + warning: color!(0xb58900), // yellow }; /// The built-in [Solarized] Dark variant of a [`Palette`]. @@ -110,6 +125,7 @@ impl Palette { primary: color!(0x2aa198), // cyan success: color!(0x859900), // green danger: color!(0xdc322f), // red + warning: color!(0xb58900), // yellow }; /// The built-in [Gruvbox] Light variant of a [`Palette`]. |