@@ -143,30 +143,37 @@ struct ThemePalette {
143143
144144impl Default for ThemePalette {
145145 fn default() -> Self {
146− Self::new(hashmap! {
147− "black".to_string() => Color::Black,
148− "red".to_string() => Color::Red,
149− "green".to_string() => Color::Green,
150− "yellow".to_string() => Color::Yellow,
151− "blue".to_string() => Color::Blue,
152− "magenta".to_string() => Color::Magenta,
153− "cyan".to_string() => Color::Cyan,
154− "gray".to_string() => Color::Gray,
155− "light-red".to_string() => Color::LightRed,
156− "light-green".to_string() => Color::LightGreen,
157− "light-yellow".to_string() => Color::LightYellow,
158− "light-blue".to_string() => Color::LightBlue,
159− "light-magenta".to_string() => Color::LightMagenta,
160− "light-cyan".to_string() => Color::LightCyan,
161− "light-gray".to_string() => Color::LightGray,
162− "white".to_string() => Color::White,
163− })
146+ Self {
147+ palette: hashmap! {
148+ "black".to_string() => Color::Black,
149+ "red".to_string() => Color::Red,
150+ "green".to_string() => Color::Green,
151+ "yellow".to_string() => Color::Yellow,
152+ "blue".to_string() => Color::Blue,
153+ "magenta".to_string() => Color::Magenta,
154+ "cyan".to_string() => Color::Cyan,
155+ "gray".to_string() => Color::Gray,
156+ "light-red".to_string() => Color::LightRed,
157+ "light-green".to_string() => Color::LightGreen,
158+ "light-yellow".to_string() => Color::LightYellow,
159+ "light-blue".to_string() => Color::LightBlue,
160+ "light-magenta".to_string() => Color::LightMagenta,
161+ "light-cyan".to_string() => Color::LightCyan,
162+ "light-gray".to_string() => Color::LightGray,
163+ "white".to_string() => Color::White,
164+ },
165+ }
164166 }
165167}
166168
167169impl ThemePalette {
168170 pub fn new(palette: HashMap<String, Color>) -> Self {
169− Self { palette }
171+ let ThemePalette {
172+ palette: mut default,
173+ } = ThemePalette::default();
174+
175+ default.extend(palette);
176+ Self { palette: default }
170177 }
171178
172179 pub fn hex_string_to_rgb(s: &str) -> Result<Color, String> {