|
background()
|
||||||||||||||
|
Description
or
Parameters gray – number specifying value between white and black value1 – red value value2 – green value value3 – blue value Returns none Related stroke() fill() Example void setup() { background(0,0,0);// set the screen black } void loop() { background(255,0,0);// set the screen Red delay(1000); //delay 1 second background(0,255,0);// set the screen Green delay(1000); //delay 1 second background(0,0,255);// set the screen Blue delay(1000); //delay 1 second background(255);// set the screen White delay(1000); //delay 1 second background(255,255,255);// set the screen White delay(1000); //delay 1 second background(200);// set the screen to a light shade of gray delay(1000); //delay 1 second background(200,200,200);// set the screen to a light shade of gray delay(1000); //delay 1 second background(150);// set the screen to a lighter shade of gray delay(1000); //delay 1 second background(150,150,150);// set the screen to a lighter shade of gray delay(1000); //delay 1 second background(100);// set the screen to a much lighter shade of gray delay(1000); //delay 1 second background(100,100,100);// set the screen to a much lighter shade of gray delay(1000); //delay 1 second } Notes
is the same as
or
is the same as
|
||||||||||||||



