Package heronarts.lx.color
Class LXDynamicColor
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.LXModulatorComponent
heronarts.lx.color.LXDynamicColor
- All Implemented Interfaces:
LXLoopTask
,LXPath
,LXSerializable
,LXOscComponent
,LXParameterListener
A dynamic color is a color that has a few different settings that allows it to either
be fixed or to change its value over time.
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.lx.LXModulatorComponent
LXModulatorComponent.Profiler
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Hidden, LXComponent.Placeholder, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Modifier and TypeFieldDescriptionfinal ColorParameter
final EnumParameter<LXDynamicColor.Mode>
final BoundedParameter
final ColorParameter
final ColorParameter
Fields inherited from class heronarts.lx.LXModulatorComponent
modulators, profiler
Fields inherited from class heronarts.lx.LXComponent
children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFile
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
ModifierConstructorDescriptionLXDynamicColor
(LXSwatch swatch) protected
LXDynamicColor
(LXSwatch swatch, int initialColor) -
Method Summary
Modifier and TypeMethodDescriptiondouble
getBasis()
float
int
getColor()
Gets the current value of this dynamic colordouble
getHue()
Gets the hue of the current dynamic color.float
getHuef()
Gets the hue of the current dynamic color.int
getIndex()
getPath()
Accessor for the path of this object.float
Gets the saturation of the current dynamic color.Methods inherited from class heronarts.lx.LXModulatorComponent
addModulator, addModulator, addModulator, addModulator, addModulator, constructProfiler, dispose, getModulator, getModulators, loop, moveModulator, removeModulator, startModulator
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, contains, copyParameters, getCategory, getChild, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isValidOscParameter, load, loadParameters, loadPreset, onParameterChanged, removeParameter, removeParameter, removeParameter, removeParameter, save, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.osc.LXOscComponent
getOscAddress, handleOscMessage
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
mode
-
blendMode
-
period
-
-
secondary
-
color
-
-
Constructor Details
-
LXDynamicColor
-
LXDynamicColor
-
-
Method Details
-
getSwatch
-
getPath
Description copied from class:LXComponent
Accessor for the path of this object. Returns the path this component was registered with. Some subclasses may override this if path structure is dynamic.- Specified by:
getPath
in interfaceLXPath
- Overrides:
getPath
in classLXComponent
- Returns:
- path of this component relative to its parent
-
getIndex
public int getIndex() -
getBasis
public double getBasis() -
getHue
public double getHue()Gets the hue of the current dynamic color. This will return a valid value even if brightness is all the way down and the color is black.- Returns:
- Hue
-
getHuef
public float getHuef()Gets the hue of the current dynamic color. This will return a valid value even if brightness is all the way down and the color is black.- Returns:
- Hue
-
getSaturation
public float getSaturation()Gets the saturation of the current dynamic color. This will return a valid value even if brightness is all the way down and the color is black. -
getBrightness
public float getBrightness() -
getColor
public int getColor()Gets the current value of this dynamic color- Returns:
- Color, which may be blending or oscillating different options
-