summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2015-05-03 11:36:32 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2015-05-03 11:36:32 +0200
commit39e4bf80b8f9a72f3235ee21580bb03e301175fb (patch)
treee9fe1dff5f53bc821f5d9ccc1bdb65b9dc6292ea
parent2a8d02b0cf0c9f37f090f6cf21a155a894904ad3 (diff)
downloadvtcol-39e4bf80b8f9a72f3235ee21580bb03e301175fb.tar.gz
vtcol.rs: implement pretty printing of schemes loaded from files
-rw-r--r--vtcol.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/vtcol.rs b/vtcol.rs
index 785c533..0b86fc2 100644
--- a/vtcol.rs
+++ b/vtcol.rs
@@ -231,7 +231,7 @@ impl<'a> Job<'a> {
Scheme::Default => Job::dump_scheme(&DEFAULT_COLORS),
Scheme::SolarizedDark => Job::dump_scheme(&SOLARIZED_COLORS_DARK),
Scheme::SolarizedLight => Job::dump_scheme(&SOLARIZED_COLORS_LIGHT),
- Scheme::Custom(_fname) => panic!("cannot dump custom palette, yet")
+ Scheme::Custom(fname) => Job::dump_palette(Palette::from_file(&fname))
}
}
@@ -242,6 +242,12 @@ impl<'a> Job<'a> {
pal.dump()
}
+ fn
+ dump_palette (pal : Palette)
+ {
+ pal.dump()
+ }
+
} /* [impl Job] */
/* Rust appears to come with two wrappers for ``ioctl(2)``, but neither can be utilized for our
@@ -402,7 +408,6 @@ impl Palette {
panic!("invalid color definition: {}", line);
}
let col = line.slice_chars(idx, idx + RAW_COLEXPR_SIZE);
- println!("raw color: {}", col);
let (r, g, b) = rgb_of_hex_triplet(col);
pal[pal_idx + 0_us] = r;