A RGB led
Creates an instance of the Led class.
Red value (0-255).
Green value (0-255).
Blue value (0-255).
Brightens the LED color by a specified factor.
Brightness factor (e.g., 1.2 is 20% brighter).
The updated Led instance.
Desaturates the LED color by a specified factor.
Desaturation factor (1 for full grayscale, 0 for no change).
Dims the LED color by a specified factor.
Dim factor (e.g., 0.8 is 20% dimmer).
Inverts the RGB values.
Checks if the LED color is turned on (non-zero).
True if the LED is on, false otherwise.
Saturates the LED color by a specified factor.
Saturation factor (greater than 1 to saturate, between 0 and 1 to desaturate).
Sets the RGB values to the specified values.
New red value.
New green value.
New blue value.
Converts the RGB values to a Uint8Array.
The RGB values in a Uint8Array format.
Returns a string representation of the RGB values.
String in the format 'rgb(r, g, b)'.
Sets all RGB values to 0, turning the LED off.
Generated using TypeDoc
A RGB led
Export