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 ClassesNested classes/interfaces inherited from class heronarts.lx.LXModulatorComponent
LXModulatorComponent.ProfilerNested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.Placeholder, LXComponent.PluginRequired, LXComponent.RenamableNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ColorParameterfinal EnumParameter<LXDynamicColor.Mode> final BoundedParameterfinal ColorParameterfinal ColorParameterFields inherited from class heronarts.lx.LXModulatorComponent
modulators, profilerFields inherited from class heronarts.lx.LXComponent
childArrays, 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, presetFileFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
ConstructorsModifierConstructorDescriptionLXDynamicColor(LXSwatch swatch) protectedLXDynamicColor(LXSwatch swatch, int initialColor) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetBasis()floatintgetColor()Gets the current value of this dynamic colordoublegetHue()Gets the hue of the current dynamic color.floatgetHuef()Gets the hue of the current dynamic color.intgetIndex()getPath()Accessor for the path of this object.floatGets 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, startModulatorMethods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, getCategory, getChild, getComponentDescription, 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.osc.LXOscComponent
getOscAddress, handleOscMessageMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
mode
-
blendMode
-
period
-
-
secondary
-
color
-
-
Constructor Details
-
LXDynamicColor
-
LXDynamicColor
-
-
Method Details
-
getSwatch
-
getPath
Description copied from class:LXComponentAccessor 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:
getPathin interfaceLXPath- Overrides:
getPathin 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
-