Working with Colors
CreatiCode last edited by info-creaticode
In the CreatiCode playground, you can specify a color using the color palette. You can use the slider for big changes, or use the small up/down arrows to change the value by 1.
Let’s discuss the meaning of each number:
The color value allows you to choose the main color theme. Here are the values for 8 common colors. Any other value will give you a combination of its 2 neighbor colors.
The saturation controls the intensity of the color. At 0, you get while (no color), and at 100 you get the full color.
The brightness controls how bright or dark the color is. Here are some common brightness values. At a brightness of 0, you will get the black color.
The transparency controls how much you can see through a shape. When it is 100, you will not see this color at all. Here are some bubbles with different transparencies:
You can reproduce any color with this reporter block. The 4 input values would work the same way as the 4 sliders in the color palette:
With the color block, it is very easy to create random colors within a certain range. For example, suppose you want to print the word “Hello” in a random blue color, you can use random values for the color and saturation like this:
This is the output: