toxi.color.theory
Class AnalogousStrategy
java.lang.Object
toxi.color.theory.AnalogousStrategy
- All Implemented Interfaces:
- ColorTheoryStrategy
public class AnalogousStrategy
- extends java.lang.Object
- implements 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 |
static java.lang.String |
NAME
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
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
-
createListFromColor
public ColorList createListFromColor(ReadonlyTColor src)
- Description copied from interface:
ColorTheoryStrategy
- Creates a new
ColorList
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 interface ColorTheoryStrategy
- Parameters:
src
- source color
- Returns:
- list of matching colors created by the strategy.
getName
public java.lang.String getName()
- Description copied from interface:
ColorTheoryStrategy
- Returns the unique name of the strategy.
- Specified by:
getName
in interface ColorTheoryStrategy
- Returns:
- name
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object