[−][src]Function cichlid::hsv_gradient
pub fn hsv_gradient<'a, C: 'a + From<HSV>, I: IntoIterator<Item = &'a mut C>>(
output: I,
length: usize,
start: HSV,
end: HSV,
dir: GradientDirection
)
Creates a axial (two-color) gradient from the HSV values start
to (exclusive) end
.
This function will fill the array inclusive of the start
HSV and exclusive of the end
HSV.
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.