Skip to main content

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.

RGB colour (explicit 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).

RGB operations

This block performs an operation on two colours.

  • +: adds two colours together.
  • -: subtracts one colour from another.

The output is a new colour.

RGB fade

This block fades a colour by a specific percentage.

  • colour: the colour to fade.
  • fade: the percentage to fade by.

The output is a new colour.