use super::*;
mod builtin;
#[derive(Clone, Debug)]
pub struct Palette {
gradient: bool,
key_points: BTreeMap<u32, Srgb>,
}
impl Palette {
pub fn get_color(&self, weight: u32) -> Result<Srgb> {
match self.key_points.get(&weight) {
Some(s) => Ok(*s),
None if self.gradient => {
syntax_error!("TODO")
},
None => {
syntax_error!("TODO")
},
}
}
}