Your Name hace 1 año
padre
commit
d6c76281c8
Se han modificado 2 ficheros con 26 adiciones y 0 borrados
  1. 1 0
      src/lib.rs
  2. 25 0
      src/theme.rs

+ 1 - 0
src/lib.rs

@@ -1,4 +1,5 @@
 pub mod cytoband;
+pub mod theme;
 
 #[cfg(test)]
 mod tests {

+ 25 - 0
src/theme.rs

@@ -0,0 +1,25 @@
+use std::collections::HashMap;
+
+#[derive(Debug)]
+pub struct Colors {
+    pub map: HashMap<String, String>,
+}
+
+impl Default for Colors {
+    fn default() -> Self {
+        let def = vec![
+            ("dark_grey", "#333333"),
+            ("beige", "#fdf0d5"),
+            ("light_grey", "#eeeeee"),
+            ("dark_red", "#780000"),
+            ("red", "#c1121f"),
+            ("blue", "#669bbc"),
+            ("dark_blue", "#003049"),
+        ];
+        let map: HashMap<_, _> = def
+            .into_iter()
+            .map(|(k, v)| (k.to_string(), v.to_string()))
+            .collect();
+        Self { map }
+    }
+}