/** Collect some `Gradient`s and a default color together to produce
    a spec. */
Collect some `Gradient`s and a default color together to produce
a spec.
Collect some ` Gradient ` s and a default color together to produce a spec .
pub fn new(gradients: Vec<Gradient>, default: RGB) -> ColorSpec {
        let length = gradients.iter().map(|g| g.steps).sum();
        ColorSpec {
            length,
            default,
            gradients,
        }
    }
pub fn new ( gradients : Vec < Gradient > , default : RGB ) -> ColorSpec { let length = gradients . iter ( ) . map ( | g | g . steps ) . sum ( ) ; ColorSpec { length , default , gradients , } }
Collect some `Gradient`s and a default color together to produce
a spec.
Collect some ` Gradient ` s and a default color together to produce a spec .
gradients
Vec<Gradient>
default
RGB