Learn creative coding writing simple programs
17. A better way to generate random colors
Here we make the colors of our animated rainbow less pale. Until now we have used the RGB color mode to randomly generate colors. In this episode we discover the HSB color mode. It's easier to control because it allows us to generate random colors with certain properties, for example dark colors, pale colors, bright colors, etc. That means they are less random and probably closer to what we want.
Code editor
You can make changes to the code below. Then
Try to stay close to the topic of this episode. Use the Processing forums for help with unrelated Processing projects (or hire me for help ;-)
To indicate that a word in your comment is code, use the `backtick`. Example
Do `float` and `int` smell similar?
To highlight code blocks, surround it with ``` code-fences ``` like this:``` void setup() { size(600, 600); } ```