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)
   More universal colorMode
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: More universal colorMode  (Read 1722 times)
skloopy

WWW
More universal colorMode
« on: Nov 12th, 2003, 9:49am »

Hi I was just using colorMode for the first time. I thought it was little confusing that colorMode affects when you make color with color() stroke() and fill() but not when you get it with red() blue() green() brightness() hue() and saturation().
 
Hmm that's kind of unclear. What I mean is that when you get a color it always returns 0-255, not what you set in colorMode..
 
By the way, if I want to get a value from 0-1 i should divide a component like red by 255, not 256, right?
 
fry


WWW
Re: More universal colorMode
« Reply #1 on: Nov 12th, 2003, 4:13pm »

uhoh, that would be a bug..  
 
red(), green() etc should all be in the range of the current colorMode(). is that not the case?
 
skloopy

WWW
Re: More universal colorMode
« Reply #2 on: Nov 12th, 2003, 7:44pm »

Yeah. I mean yeah that's not the case.
 
This works
 
Code:
colorMode(RGB, 1.0);
println("" + red(color(1,1,1)));

but not this
 
Code:
color c = color(255,0,0);
colorMode(RGB, 1.0);
println("" + red(c));
 
fry


WWW
Re: More universal colorMode
« Reply #3 on: Nov 23rd, 2003, 11:44pm »

k, i'll get that fixed for 68. thanks a lot for the report (or your out loud confusion that led to the bug report )
 
fry


WWW
Re: More universal colorMode
« Reply #4 on: Jul 15th, 2004, 4:07pm »

fixed for megabucket.
 
Pages: 1 

« Previous topic | Next topic »