by_components/
theme.rs

1#[derive(Debug, Clone)]
2pub struct ColorTheme {
3    pub background: String,
4    pub icon: IconColorTheme,
5    pub button: ButtonColorTheme,
6    pub text: TextColorTheme,
7    pub card: CardColorTheme,
8    pub popup: PopupColorTheme,
9    pub input: InputColorTheme,
10    pub services: ServiceColorTheme,
11}
12
13impl Default for ColorTheme {
14    fn default() -> Self {
15        ColorTheme {
16            background: "#2C2E42".to_string(),
17            icon: IconColorTheme::default(),
18            button: ButtonColorTheme::default(),
19            text: TextColorTheme::default(),
20            card: CardColorTheme::default(),
21            popup: PopupColorTheme::default(),
22            input: InputColorTheme::default(),
23            services: ServiceColorTheme::default(),
24        }
25    }
26}
27
28#[derive(Debug, Clone)]
29pub struct ServiceColorTheme {
30    pub kakao: String,
31}
32
33impl Default for ServiceColorTheme {
34    fn default() -> Self {
35        ServiceColorTheme {
36            kakao: "#F7E111".to_string(),
37        }
38    }
39}
40
41#[derive(Debug, Clone)]
42pub struct IconColorTheme {
43    pub primary: String,
44    pub secondary: String,
45}
46
47impl Default for IconColorTheme {
48    fn default() -> Self {
49        IconColorTheme {
50            primary: "#8588AB".to_string(),
51            secondary: "#666C6E".to_string(),
52        }
53    }
54}
55
56#[derive(Debug, Clone)]
57pub struct ButtonColorTheme {
58    pub primary: String,
59    pub secondary: String,
60}
61
62impl Default for ButtonColorTheme {
63    fn default() -> Self {
64        ButtonColorTheme {
65            primary: "#363952".to_string(),
66            secondary: "#424563".to_string(),
67        }
68    }
69}
70
71#[derive(Debug, Clone)]
72pub struct TextColorTheme {
73    pub primary: String,
74    pub secondary: String,
75    pub disabled: String,
76}
77
78impl Default for TextColorTheme {
79    fn default() -> Self {
80        TextColorTheme {
81            primary: "#FFFFFF".to_string(),
82            secondary: "#ADBCD7".to_string(),
83            disabled: "#404761".to_string(),
84        }
85    }
86}
87
88#[derive(Debug, Clone)]
89pub struct CardColorTheme {
90    pub primary: String,
91    pub secondary: String,
92}
93
94impl Default for CardColorTheme {
95    fn default() -> Self {
96        CardColorTheme {
97            primary: "#212231".to_string(),
98            secondary: "#292B3D".to_string(),
99        }
100    }
101}
102
103#[derive(Debug, Clone)]
104pub struct PopupColorTheme {
105    pub background: String,
106}
107
108impl Default for PopupColorTheme {
109    fn default() -> Self {
110        PopupColorTheme {
111            background: "#2E3045".to_string(),
112        }
113    }
114}
115
116#[derive(Debug, Clone)]
117pub struct InputColorTheme {
118    pub primary: String,
119}
120
121impl Default for InputColorTheme {
122    fn default() -> Self {
123        InputColorTheme {
124            primary: "#212231".to_string(),
125        }
126    }
127}