If you are using khan then in the code it will have a color picker to easily find a color. Since you can't see the color picker in action here, here's a GIF of it being used:
Click anywhere in the numbers to get the color picker to pop up. Then, click on the right hand color bar to change the general color you're picking, and click in the left hand side to change the lightness/brightness of the color.
background(r, g, b, a*)
Sets the background color of the canvas. Note that calling this will color over anything drawn before the command.
Parameters
Meaning of Parameters
Parameters
Meaning of Parameters
1
r
amount of red, ranges from 0 to 255
2
g
amount of green, ranges from 0 to 255
3
b
amount of blue, ranges from 0 to 255
4
a
(Optional) transparency, ranges from 0 to 255
There are no rows in this table
Example
Result
fill(r, g, b, a*)
Sets the fill color for all shapes drawn after the function call.
Parameters
Meaning of Parameters
Parameters
Meaning of Parameters
1
r
amount of red, ranges from 0 to 255
2
g
amount of green, ranges from 0 to 255
3
b
amount of blue, ranges from 0 to 255
4
a
(Optional)
transparency, ranges from 0 to 255
There are no rows in this table
Example
Result
noFill()
Makes all shapes drawn after this function call transparent.
Example
Result
strokeWeight(thickness)
Sets the thickness of all lines and outlines drawn after the function call.
Parameters
Meaning of Parameters
Parameters
Meaning of Parameters
1
thickness
a number specifying the thickness
There are no rows in this table
Example
Result
stroke(r, g, b, a*)
Sets the outline color for all shapes drawn after the function call.
Parameters
Meaning of Parameters
Parameters
Meaning of Parameters
1
r
amount of red, ranges from 0 to 255
2
g
amount of green, ranges from 0 to 255
3
b
amount of blue, ranges from 0 to 255
4
a
(Optional) transparency, ranges from 0 to 255
There are no rows in this table
Example
Result
noStroke()
Disables outlines for all shapes drawn after the function call.