FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

fill()

   
Examples  
fill(153); 
rect(30, 20, 55, 55); 
fill(204, 102, 0); 
rect(30, 20, 55, 55); 
Description   Sets the color used to fill shapes. For example, if you call fill(204, 102, 0) and draw a rectangle it and all subsequent shapes will be filled with orange. This color is either specified in terms of the RGB or HSB color depending on the current colorMode() (the default color space is RGB, with each value in the range from 0 to 255). Note: the value for the parameter "gray" must be less than or equal to the current maximum value as specified by colorMode(). The default maximum value is 255.
   
Syntax  
fill(gray)
fill(gray, alpha)
fill(color)
fill(value1, value2, value3)
fill(value1, value2, value3, alpha)
   
Parameters  
gray   int or float: number specifying value between white and black

alpha   int or float: opacity of the fill

color   color: any value of the color datatype

value1   int or float: red or hue value

value2   int or float: green or saturation value

value3   int or float: blue or brightness value

   
Returns   None
   
Usage   Web & Application
   
Related   noFill()
colorMode()
 
 






   
 
Updated: Fri Jul 15 16:35:39 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info