[−][src]Function cichlid::rgb_gradient
pub fn rgb_gradient<'a, C: 'a + From<ColorRGB>, I: IntoIterator<Item = &'a mut C>>(
output: I,
length: usize,
start: ColorRGB,
end: ColorRGB
)
Creates a two-color gradient from two RGB values.
This function will fill the array inclusive of the start
RGB and exclusive of the end
RGB.
This means that after completion, output[output.len() - 1] will not be the end color, but rather the interpolated color before
start`.
Edge Cases
If output
is empty, the operation returns immediately.