Skip to content

Color ​

Colors are used in a variety of graphics programs.

Basic colors ​

The simplest way to get a color is to use the color palette.
Clicking the white rounded square opens the color palette, where you can choose the color you want.

color_picker

Parameters ​

NameKindDescriptionRange / TypeDefault
colorColorColor presetblack, red, yellow, green,
cyan, blue, magenta, white
-

Python ​

python
# e.g. when the red preset is selected
Utils.color('red')

Slider color ​

The slider color block lets you mix a color yourself using a wheel and a bar slider.
Clicking the white rounded square opens a circular color wheel for adjusting the red (R), green (G), blue (B) values, together with a bar slider for adjusting the brightness.

color_slider

Parameters ​

NameKindDescriptionRange / TypeDefault
colorColorColor wheel + brightness sliderr: 0~255, g: 0~255, b: 0~255-

Python ​

python
# color selected on the color wheel → [R, G, B]
Utils.color_slider(255, 128, 0)

RGB color ​

The RGB color block builds an RGB array by specifying the red, green, and blue values individually.

color_rgb

Parameters ​

NameKindDescriptionRange / TypeDefault
rInput (block)Red valueInteger 0 to 255-
gInput (block)Green valueInteger 0 to 255-
bInput (block)Blue valueInteger 0 to 255-

Python ​

python
Utils.color_rgb(red, green, blue)

Random color ​

The random color block generates a random RGB color each time it is called.

color_random

Parameters ​

(none)

Python ​

python
Utils.random_color()