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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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:ColorTheoryStrategyCreates a newColorListof colors for the supplied source color based on the strategy. The number of colors returned is unspecified and depends on the strategy.- Specified by:
createListFromColorin interfaceColorTheoryStrategy- Parameters:
src- source color- Returns:
- list of matching colors created by the strategy.
-
getName
Description copied from interface:ColorTheoryStrategyReturns the unique name of the strategy.- Specified by:
getNamein interfaceColorTheoryStrategy- Returns:
- name
-
toString
-