Package heronarts.lx.color
Interface GradientUtils.HueInterpolation
- Enclosing class:
- GradientUtils
public static interface GradientUtils.HueInterpolation
Hue interpolation modes. Since the hues form a color wheel, there are various
strategies for moving from hue1 to hue2.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final GradientUtils.HueInterpolation
HSV path always stays within the color wheel of raw values, never crossing the 360-degree boundarystatic final GradientUtils.HueInterpolation
HSVCCW takes a counter-clockwise path always, even if it means a longer interpolation from hue1 to hue2, e.g.static final GradientUtils.HueInterpolation
HSVCW takes a clockwise path always, even if it means a longer interpolation from hue1 to hue2, e.g.static final GradientUtils.HueInterpolation
HSVM takes the minimum path from hue1 to hue2, wrapping around the 360-degree boundary if it makes for a shorter path -
Method Summary
Modifier and TypeMethodDescriptionfloat
lerp
(float hue1, float hue2, float lerp) Interpolate between two values
-
Field Details
-
HSV
HSV path always stays within the color wheel of raw values, never crossing the 360-degree boundary -
HSVM
HSVM takes the minimum path from hue1 to hue2, wrapping around the 360-degree boundary if it makes for a shorter path -
HSVCW
HSVCW takes a clockwise path always, even if it means a longer interpolation from hue1 to hue2, e.g. [350->340] will go [350->360],[0->340] -
HSVCCW
HSVCCW takes a counter-clockwise path always, even if it means a longer interpolation from hue1 to hue2, e.g. [340->350] will go [340->0],[360->350]
-
-
Method Details
-
lerp
float lerp(float hue1, float hue2, float lerp) Interpolate between two values- Parameters:
hue1
- Source huehue2
- Destination huelerp
- Interpolation amount- Returns:
- A hue on a path between these two values
-