Package elki.visualization.style
Enum ColorInterpolation
- java.lang.Object
-
- java.lang.Enum<ColorInterpolation>
-
- elki.visualization.style.ColorInterpolation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ColorInterpolation>
public enum ColorInterpolation extends java.lang.Enum<ColorInterpolation>
Color interpolation- Since:
- 0.8.0
- Author:
- Robert Gehde
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ColorInterpolation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
interpolate(java.lang.String color, java.lang.String neutral, double intensity)
Interpolate two colors.static ColorInterpolation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ColorInterpolation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RGB
public static final ColorInterpolation RGB
ColorInterpolation in RGB space
-
HSV
public static final ColorInterpolation HSV
ColorInterpolation in HSV space.note: this changes the tone linear as well, if you use a black color, black is coded as (0,0,x). In that case it will change the color.
-
-
Method Detail
-
values
public static ColorInterpolation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ColorInterpolation c : ColorInterpolation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColorInterpolation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
interpolate
public abstract java.lang.String interpolate(java.lang.String color, java.lang.String neutral, double intensity)
Interpolate two colors.- Parameters:
color
-neutral
-intensity
-- Returns:
- interpolated color
-
-