FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   coloing shape
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: coloing shape  (Read 509 times)
elizabeth
Guest
Email
coloing shape
« on: Oct 18th, 2003, 10:14pm »

i have to start with a rectangle, triangle, and square. all three shapes are already drawn. i have to add code below the code that drew the shapes to color them in. i am not sure how to use colorMode and any further assistance would be helpful. thanks.
 
jbk303


Re: coloing shape
« Reply #1 on: Oct 19th, 2003, 12:06am »

Do you know what color you want the shapes to be, or do you want the color to change? If you want the color to stay the same, just put
 
fill(red, green, blue);
ellipse(x,y,w,h);
fill(red, green, blue);
rect(x,y,w,h);
 
etc.
 
If you want the color to change, just make the red, green, and blue values variables and change their values. If you read the reference for color() you will find lots more info.
 
Josh
 
Pages: 1 

« Previous topic | Next topic »