Your Name 1 년 전
부모
커밋
d6c76281c8
2개의 변경된 파일26개의 추가작업 그리고 0개의 파일을 삭제
  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 }
+    }
+}