Package toxi.color.theory
Class AnalogousStrategy
java.lang.Object
toxi.color.theory.AnalogousStrategy
- All Implemented Interfaces:
ColorTheoryStrategy
Creates a new palette of 4 similar (slightly paler) colors in addition to the
given start color. The hue variance and contrast can be adjusted.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new instance with default contrast (25%) and 10AnalogousStrategy
(float theta, float contrast) AnalogousStrategy
(int theta, float contrast) -
Method Summary
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
AnalogousStrategy
public AnalogousStrategy()Creates a new instance with default contrast (25%) and 10 -
AnalogousStrategy
public AnalogousStrategy(float theta, float contrast) - Parameters:
theta
- variance angle in radianscontrast
-
-
AnalogousStrategy
public AnalogousStrategy(int theta, float contrast) - Parameters:
theta
- variance angle in degreescontrast
-
-
-
Method Details
-
createListFromColor
Description copied from interface:ColorTheoryStrategy
Creates a newColorList
of colors for the supplied source color based on the strategy. The number of colors returned is unspecified and depends on the strategy.- Specified by:
createListFromColor
in interfaceColorTheoryStrategy
- Parameters:
src
- source color- Returns:
- list of matching colors created by the strategy.
-
getName
Description copied from interface:ColorTheoryStrategy
Returns the unique name of the strategy.- Specified by:
getName
in interfaceColorTheoryStrategy
- Returns:
- name
-
toString
-