Gradient backgrounds

You can make smooth two-color gradient backgrounds to use for your games and projects.

Gradient backgrounds are made by drawing thin lines of alternating color repeatedly.

(Note: Increasing the X position by 0.5 units results in the smoothest color transition. The object's X position actually becomes rounded off.)

Here is the result of the code. (Note which color appears on the top vs. the bottom.)

Still need help? Contact Us Contact Us