background() - Version: 198

Description

The background() function sets the color used for the background of the Processing window. The default background is black. Color the whole screen any of 16,777,216 different colors

The value for the parameter “gray” must be less than or equal to 255.

Syntax


background(gray)

or


background(value1, value2, value3)


Parameters

gray – number specifying value between white and black

value1 – red value

value2 – green value

value3 – blue value

Returns

none

Related

stroke()
fill()

Notes


background(100)

is the same as


background(100,100,100)


or


background(182)

is the same as


background(182,182,182)




Edit History