Split Background Colour


#1

Hello, I am very new to processing, but I have an assignment that requires me to split the screen with blue on top and green on the bottom. I know it’s very basic, but I can’t find anything about it in the processing reference or in the forum. I would really appreciate some help!

Thank you!


#2

Make background() green and draw a blue fill() rect() at the top w/ half height. :black_square_button:


#3

thank you so much! :grin:


#4

You may also need to use noStroke() to eliminate outlines.

After mastering it with background(), you may also want to move to using two rect() calls with different fill(). This is the next step before putting those rects in a loop, so that you can have 2, 3, or 4 bands of color on the screen.


#5

Studio.ProcessingTogether.com/sp/pad/export/ro.9PDcp7xMBknWz