Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

color

   
Examples  
color c1 = color(204, 153, 0); 
color c2 = #FFCC00; 
noStroke(); 
fill(c1); 
rect(0, 0, 25, 100); 
fill(c2); 
rect(25, 0, 25, 100); 
color c3 = get(10, 50); 
fill(c3); 
rect(50, 0, 50, 100); 
Description   Datatype for storing color values. Colors may be assigned with the get and color() functions or they may be specified directly using hexadecimal notation such as #FFCC00. Colors are 32 bits of information ordered as AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB where the A's contain the alpha value, the R's are the red/hue value, G's are green/saturation, and B's are blue/brightness. Color is a datatype unique to Processing.
   
Syntax  
color var
color var = colorvalue
   
Parameters  
var   variable name referencing the value

colorvalue   any color value

   
Usage   Web & Application
   
Related   colorMode()
color()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas