Skip to main content

Module gradient

Module gradient 

Source
Expand description

Linear and radial gradient fills with sRGB colour interpolation. Linear and radial gradient fills with multiple colour stops (sRGB interpolation).

Structs§

GradientStop
A single gradient colour stop at normalized offset in [0, 1].
LinearGradient
A linear gradient defined by an axis (startend) and colour stops.
RadialGradient
A radial gradient defined by a centre point, a radius, and colour stops.

Functions§

lerp_color
Linearly interpolate two colours in sRGB component space at t in [0, 1].