Clamps all color channels to [0,1] interval and calls ensureAlpha to ensure alpha channel is defined (if missing sets it to alpha, default: 1).
ensureAlpha
alpha
result
source color
alpha value
Similar to clamp, but calls ensureHue to fold (instead of clamping) the hue into [0,1] interval.
ensureHue
Generated using TypeDoc
Clamps all color channels to [0,1] interval and calls
ensureAlpha
to ensure alpha channel is defined (if missing sets it toalpha
, default: 1).