system_theme/theme/
palette.rs

1//! Theme palettes
2
3use crate::ThemeColor;
4
5/// Windows Fluent light theme palette
6///
7/// Source: https://storybooks.fluentui.dev/react/?path=/docs/theme-colors--docs
8pub const FLUENT_LIGHT: ThemePalette = ThemePalette {
9    background: ThemeColor::from_rgb8(250, 250, 250),
10    foreground: ThemeColor::from_rgb8(36, 36, 36),
11    accent: ThemeColor::from_rgb8(15, 108, 189),
12    success: ThemeColor::from_rgb8(14, 112, 14),
13    warning: ThemeColor::from_rgb8(188, 75, 9),
14    danger: ThemeColor::from_rgb8(177, 14, 28),
15};
16
17/// Windows Fluent dark theme palette
18///
19/// Source: https://storybooks.fluentui.dev/react/?path=/docs/theme-colors--docs
20pub const FLUENT_DARK: ThemePalette = ThemePalette {
21    background: ThemeColor::from_rgb8(31, 31, 31),
22    foreground: ThemeColor::from_rgb8(255, 255, 255),
23    accent: ThemeColor::from_rgb8(71, 158, 245),
24    success: ThemeColor::from_rgb8(84, 176, 84),
25    warning: ThemeColor::from_rgb8(250, 160, 107),
26    danger: ThemeColor::from_rgb8(220, 98, 109),
27};
28
29/// Apple Aqua light theme palette
30///
31/// Source: https://developer.apple.com/design/human-interface-guidelines/color
32pub const AQUA_LIGHT: ThemePalette = ThemePalette {
33    background: ThemeColor::from_rgb8(229, 229, 234),
34    foreground: ThemeColor::from_rgb8(28, 28, 30),
35    accent: ThemeColor::from_rgb8(0, 136, 255),
36    success: ThemeColor::from_rgb8(52, 199, 89),
37    warning: ThemeColor::from_rgb8(255, 141, 40),
38    danger: ThemeColor::from_rgb8(255, 56, 60),
39};
40
41/// Apple Aqua dark theme palette
42///
43/// Source: https://developer.apple.com/design/human-interface-guidelines/color
44pub const AQUA_DARK: ThemePalette = ThemePalette {
45    background: ThemeColor::from_rgb8(44, 44, 46),
46    foreground: ThemeColor::from_rgb8(242, 242, 247),
47    accent: ThemeColor::from_rgb8(0, 145, 255),
48    success: ThemeColor::from_rgb8(48, 209, 88),
49    warning: ThemeColor::from_rgb8(255, 146, 48),
50    danger: ThemeColor::from_rgb8(255, 66, 69),
51};
52
53/// GNOME Adwaita light theme palette
54///
55/// Source: https://github.com/FedoraQt/QGnomePlatform/blob/master/src/color-schemes/Adwaita.colors
56pub const ADWAITA_LIGHT: ThemePalette = ThemePalette {
57    background: ThemeColor::from_rgb8(246, 245, 244),
58    foreground: ThemeColor::from_rgb8(25, 25, 25),
59    accent: ThemeColor::from_rgb8(61, 174, 233),
60    success: ThemeColor::from_rgb8(39, 174, 96),
61    warning: ThemeColor::from_rgb8(246, 116, 0),
62    danger: ThemeColor::from_rgb8(218, 68, 83),
63};
64
65/// GNOME Adwaita dark theme palette
66///
67/// Source: https://github.com/FedoraQt/QGnomePlatform/blob/master/src/color-schemes/AdwaitaDark.colors
68pub const ADWAITA_DARK: ThemePalette = ThemePalette {
69    background: ThemeColor::from_rgb8(45, 45, 45),
70    foreground: ThemeColor::from_rgb8(255, 255, 255),
71    accent: ThemeColor::from_rgb8(61, 174, 233),
72    success: ThemeColor::from_rgb8(39, 174, 96),
73    warning: ThemeColor::from_rgb8(246, 116, 0),
74    danger: ThemeColor::from_rgb8(218, 68, 83),
75};
76
77/// KDE Breeze light theme palette
78///
79/// Source: https://github.com/KDE/breeze/blob/master/colors/BreezeLight.colors
80pub const BREEZE_LIGHT: ThemePalette = ThemePalette {
81    background: ThemeColor::from_rgb8(255, 255, 255),
82    foreground: ThemeColor::from_rgb8(35, 38, 41),
83    accent: ThemeColor::from_rgb8(61, 174, 233),
84    success: ThemeColor::from_rgb8(39, 174, 96),
85    warning: ThemeColor::from_rgb8(246, 116, 0),
86    danger: ThemeColor::from_rgb8(218, 68, 83),
87};
88
89/// KDE Breeze dark theme palette
90///
91/// Source: https://github.com/KDE/breeze/blob/master/colors/BreezeDark.colors
92pub const BREEZE_DARK: ThemePalette = ThemePalette {
93    background: ThemeColor::from_rgb8(20, 22, 24),
94    foreground: ThemeColor::from_rgb8(252, 252, 252),
95    accent: ThemeColor::from_rgb8(61, 174, 233),
96    success: ThemeColor::from_rgb8(39, 174, 96),
97    warning: ThemeColor::from_rgb8(246, 116, 0),
98    danger: ThemeColor::from_rgb8(218, 68, 83),
99};
100
101/// Theme Palette
102#[derive(Debug, Clone, Copy, PartialEq)]
103pub struct ThemePalette {
104    /// Background color
105    pub background: ThemeColor,
106    /// Foreground color
107    pub foreground: ThemeColor,
108    /// Accent color
109    pub accent: ThemeColor,
110    /// Success color
111    pub success: ThemeColor,
112    /// Warning color
113    pub warning: ThemeColor,
114    /// Danger color
115    pub danger: ThemeColor,
116}