Colour
RGB LED
The RGB LED block sets a single RGB LED to a specific colour.
- r: the pin connected to the red LED.
- g: the pin connected to the green LED.
- b: the pin connected to the blue LED.
- colour: the colour to set the LED to.
The selected pins must be PWM pins.
Setup LED strip
This block sets up an LED strip with a specific number of LEDs.
- lights: the number of LEDs in the strip.
- pin: the pin connected to the strip.
Set LED colour on strip
This block sets a specific LED on the strip to a specific colour.
- light: the position of the LED on the strip.
- colour: the colour to set the LED to.
Colour (RGB values)
This block creates a colour from explicit red, green, and blue values.
- r: the red value (0-255).
- g: the green value (0-255).
- b: the blue value (0-255).
Colour operations
This block performs an operation on two colours.
- +: adds two colours together.
- -: subtracts one colour from another.
The output is a new colour.
Colour brightness
This block lightens or darkens a colour by a given percentage.
- (select): lighten or darken the colour.
- colour: the colour to adjust.
- amount: the percentage to adjust the colour by.
The output is a new colour.
Mix colours
This block mixes two colours together by a given ratio.
- colour1: the first colour.
- colour2: the second colour.
- ratio: the ratio of the two colours to mix (a value between 0 and 1).
The output is a new colour.
Invert colour
This block inverts a colour.
- colour: the colour to invert.
The output is a new colour.
Colour to greyscale
This block converts a colour to greyscale.
- colour: the colour to convert.
The output is a new colour.