pub trait ColorFunction {
type Color;
// Required methods
fn size(&self) -> usize;
fn get(&self, index: usize) -> Self::Color;
}Expand description
Trait for color lookup functions used by span_gradient.
Provides indexed access to a color palette of known size.