pub const SHELL_COLOUR_OFF: &'static str = "\x1B[0m";
pub const SCRIPTS: &'static str = include_str!("html/scripts.js");
pub fn get_shell_colour(colour: &str) -> Option<&'static str> {
match colour {
"red" => Some("\x1B[4;31m"),
"green" => Some("\x1B[4;32m"),
"cyan" => Some("\x1B[4;36m"),
"brown" => Some("\x1B[4;33m"),
"blue" => Some("\x1B[4;32m"),
"purple" => Some("\x1B[4;35m"),
"orange" => Some("\x1B[4;33m"),
_ => None,
}
}
pub fn value_to_colour(x: f32, threshold: f32) -> &'static str {
if x < threshold {
panic!("value_to_colour called with x < threshold");
} else if x < 1.5 * threshold {
"green"
} else if x < 2.0 * threshold {
"orange"
} else {
"red"
}
}