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_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   color() to behave like fill()/stroke()
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: color() to behave like fill()/stroke()  (Read 1591 times)
TomC

WWW
color() to behave like fill()/stroke()
« on: Jan 15th, 2004, 4:32pm »

Is there a reason why there isn't a color(gray) function and a color(gray,alpha) function corresponding to the fill functions?
 
Is it to do with color perception?
 
I'm using these, which seem OK, but when something this simple is missing, I always feel I have overlooked something!
 
Code:

 
int color(int gray) {
  return color(gray,gray,gray);
}
 
int color (int gray, int alpha) {
  return color(gray,gray,gray,alpha);
}
 
float color(float gray) {
  return color(gray,gray,gray);
}
 
float color (float gray, float alpha) {
  return color(gray,gray,gray,alpha);
}
 
 
fry


WWW
Re: color() to behave like fill()/stroke()
« Reply #1 on: Feb 3rd, 2004, 12:27am »

ah, that's an oversight, i'll get that in there. you're right, it should be symmetric.
 
fry


WWW
Re: color() to behave like fill()/stroke()
« Reply #2 on: Jul 15th, 2004, 3:29pm »

fixed for megabucket.
 
Pages: 1 

« Previous topic | Next topic »