How to fade an image to black over time

I have a simple example here:

It was intended to be simple but that depends on the user and their programming skill level.

In a nutshell, the example is modifying the alpha of the color with time; you may want to just increment (or decrement) with each frame or consider using millis(); Processing displays at a default of 60fps.

Remember KISS; Keep It Simple Student and build on that.

References:

colorMode() / Reference / Processing.org You may want to use RGB (default if not set)
frameRate() / Reference / Processing.org
millis() / Reference / Processing.org

Have fun!

2 Likes