hecto/src/highlighting.rs

19 lines
347 B
Rust
Raw Normal View History

2021-03-15 13:53:30 -04:00
use termion::color;
2021-03-15 14:37:41 -04:00
#[derive(PartialEq)]
2021-03-15 13:53:30 -04:00
pub enum Type {
None,
Number,
2021-03-15 14:53:08 -04:00
Match,
2021-03-15 13:53:30 -04:00
}
impl Type {
pub fn to_color(&self) -> impl color::Color {
match self {
Type::Number => color::Rgb(220, 163, 163),
2021-03-15 14:53:08 -04:00
Type::Match => color::Rgb(38, 139, 210),
2021-03-15 13:53:30 -04:00
_ => color::Rgb(255, 255, 255),
}
}
}