Changing color according to the y variable

How should one go about changing the color according to the y variable, an ombré of sorts?
Please and Thank You
Best,
Phil

Hello,

https://processing.org/ is a good place to start and has tutorials, references, examples and lists books available.

YouTube:

:slight_smile:

Processing.org/reference/colorMode_.html

There is a color selector in Menu tools

Thank you all for your quick responses, much appreciated.
Our new question is as follows:
How does one alternate colors in a pattern vís-a-vís a modulus with an if statement?
Thank you again
Best,
Phil

if(i%2 == 0)
fill(255,0,0);
else
fill(0,255,0);

i++;

1 Like

Very helpful, thank you.
Much appreciated.
Best,
Phil

1 Like