Package org.evoludo.simulator
Class ColorMapCSS.Hue
- Enclosing class:
ColorMapCSS
Color gradient following the hue.
The actual data-to-color translation is performed in the super class.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ColorMap
ColorMap.Gradient<T>, ColorMap.Gradient1D<T>, ColorMap.Gradient2D<T>, ColorMap.GradientND<T>, ColorMap.Hue<T>, ColorMap.Index<T> -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionHue(double start, double end, int nIncr) Construct a new Hue color map, starting at huestartup to hueend(both in[0.0, 1.0]) and interpolate withsteps-1intermediate colors.Hue(int nIncr) Construct a new Hue color map, starting at a hue of0.0(red) up to hue1.0(red, again) and interpolate withsteps-1intermediate colors. -
Method Summary
Modifier and TypeMethodDescriptioncolor2Color(Color color) Utility method to convert thecolorinto a color object of typeT.Methods inherited from class ColorMap.Hue
setHueRange, setHueRangeMethods inherited from class ColorMap.Gradient1D
binOf, setColor, setColor, setGradient, setGradient, setRange, translate, translate, translate, translateMethods inherited from class ColorMap.Gradient
interpolateColors, interpolateColorsMethods inherited from class ColorMap
addAlpha, addAlpha, addColors, blendColors, blendColors, translate, translate
-
Constructor Details
-
Hue
public Hue(int nIncr) Construct a new Hue color map, starting at a hue of0.0(red) up to hue1.0(red, again) and interpolate withsteps-1intermediate colors. The resulting gradient spanssteps+1colors. The default range for mapping data values onto the color gradient is[0.0, 1.0].- Parameters:
nIncr- the number of intermediate colors- See Also:
-
Hue
public Hue(double start, double end, int nIncr) Construct a new Hue color map, starting at huestartup to hueend(both in[0.0, 1.0]) and interpolate withsteps-1intermediate colors. The resulting gradient spanssteps+1colors. The default range for mapping data values onto the color gradient is[0.0, 1.0].Notes:
- If
end≤startthe colors warp around through red. - If
steps<0the hue is interpolated in reverse. - The saturation and brightness of the gradient are both maximal.
- Parameters:
start- the starting hueend- the ending huenIncr- the number of intermediate colors- See Also:
- If
-
-
Method Details
-
color2Color
Description copied from class:ColorMapUtility method to convert thecolorinto a color object of typeT.- Specified by:
color2Colorin classColorMap<String>- Parameters:
color- the color to convert- Returns:
- the color represented as an object of type
T
-