Package io.deephaven.gui.color
Enum Class ColorPaletteAlgorithms
- All Implemented Interfaces:
ColorPaletteAlgorithm
,Serializable
,Comparable<ColorPaletteAlgorithms>
,java.lang.constant.Constable
public enum ColorPaletteAlgorithms
extends Enum<ColorPaletteAlgorithms>
implements ColorPaletteAlgorithm
Pre-made
ColorPaletteAlgorithm
s.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColorPaletteAlgorithms
colorPaletteAlgorithm
(String name) Gets the algorithm corresponding to the givenname
.static String[]
Gets the names of the available ColorPaletteAlgorithms.Gets the algorithm's startingColor
.Gets the nextColor
afterc
in the algorithm.static ColorPaletteAlgorithms
Returns the enum constant of this class with the specified name.static ColorPaletteAlgorithms[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GOLDEN
Golden ratio algorithm. Rotates hue values by the inverse golden ratio. -
TRIAD_MIXING
Triad mixing algorithm. Randomly generates and mixes 3 colors and their RGB components.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
nextColor
Description copied from interface:ColorPaletteAlgorithm
Gets the nextColor
afterc
in the algorithm.- Specified by:
nextColor
in interfaceColorPaletteAlgorithm
- Parameters:
c
- color- Returns:
- result of plugging
c
in the algorithm
-
getInitialColor
Description copied from interface:ColorPaletteAlgorithm
Gets the algorithm's startingColor
.- Specified by:
getInitialColor
in interfaceColorPaletteAlgorithm
- Returns:
- algorithm's starting
Color
-
colorPaletteAlgorithm
Gets the algorithm corresponding to the givenname
.- Parameters:
name
- case insensitive algorithm descriptor- Returns:
- algorithm corresponding to the given
name
- Throws:
IllegalArgumentException
-name
must not be null
-
colorPaletteAlgorithmNames
Gets the names of the available ColorPaletteAlgorithms.- Returns:
- array of the available ColorPaletteAlgorithms names
-