Package org.openhab.core.util
Class LightModel.WhiteLED
java.lang.Object
org.openhab.core.util.LightModel.WhiteLED
- Enclosing class:
LightModel
Internal: a class that models the RGB LED sub-components of a white LED light. The RGB component
weightings are in the range [0.0..1.0] which if scaled to 255 would produce the color temperature
specified in the constructor at 100% brightness.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWhiteLED(double ledMirek) Converts the given Mirek/Mired color temperature to RGB component weighting for the LED, so that its output would have the specified color temperature. -
Method Summary
Modifier and TypeMethodDescriptionprotected doublegetMirek()Get the Mirek/Mired color temperature of the LED.protected double[]Get the RGB component weighting of the LED.
-
Constructor Details
-
WhiteLED
protected WhiteLED(double ledMirek) Converts the given Mirek/Mired color temperature to RGB component weighting for the LED, so that its output would have the specified color temperature. Each component is in the range [0.0..1.0]- Parameters:
ledMirek- the color temperature of the LED in Mirek/Mired.
-
-
Method Details
-
getMirek
protected double getMirek()Get the Mirek/Mired color temperature of the LED.- Returns:
- the Mirek/Mired color temperature of the LED.
-
getProfile
protected double[] getProfile()Get the RGB component weighting of the LED.- Returns:
- an array of 3 double values representing the RGB components of the LED in the range [0.0..1.0] which if scaled to 255 would produce the color temperature specified by the 'mirek' field at 100% brightness.
-