by_components/
theme.rs

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

impl Default for ColorTheme {
    fn default() -> Self {
        ColorTheme {
            background: "#2C2E42".to_string(),
            icon: IconColorTheme::default(),
            button: ButtonColorTheme::default(),
            text: TextColorTheme::default(),
            card: CardColorTheme::default(),
            popup: PopupColorTheme::default(),
            input: InputColorTheme::default(),
            services: ServiceColorTheme::default(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct ServiceColorTheme {
    pub kakao: String,
}

impl Default for ServiceColorTheme {
    fn default() -> Self {
        ServiceColorTheme {
            kakao: "#F7E111".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct IconColorTheme {
    pub primary: String,
}

impl Default for IconColorTheme {
    fn default() -> Self {
        IconColorTheme {
            primary: "#8588AB".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct ButtonColorTheme {
    pub primary: String,
    pub secondary: String,
}

impl Default for ButtonColorTheme {
    fn default() -> Self {
        ButtonColorTheme {
            primary: "#363952".to_string(),
            secondary: "#424563".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct TextColorTheme {
    pub primary: String,
    pub secondary: String,
    pub disabled: String,
}

impl Default for TextColorTheme {
    fn default() -> Self {
        TextColorTheme {
            primary: "#FFFFFF".to_string(),
            secondary: "#ADBCD7".to_string(),
            disabled: "#404761".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct CardColorTheme {
    pub primary: String,
    pub secondary: String,
}

impl Default for CardColorTheme {
    fn default() -> Self {
        CardColorTheme {
            primary: "#212231".to_string(),
            secondary: "#292B3D".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct PopupColorTheme {
    pub background: String,
}

impl Default for PopupColorTheme {
    fn default() -> Self {
        PopupColorTheme {
            background: "#2E3045".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct InputColorTheme {
    pub primary: String,
}

impl Default for InputColorTheme {
    fn default() -> Self {
        InputColorTheme {
            primary: "#212231".to_string(),
        }
    }
}