Hiya.
The following code generates different results in v68 and v85.
Quote:colorMode(HSB);
fill(0,128,128 );
rect(0,0,50,100);
color myColor = color(0,128,128 );
fill(myColor);
rect(50,0,50,100);
In alpha 68 you get two dull red rectangles (i.e. HSB(0,128,128 )). In beta 85 you get one red, one blue-green (i.e. RGB(0,128,128 )).
It appears that 'fill', (and 'set' and some other 2D graphics commands) don't pick up the fact that we've switched to HSB. You can trip it to be correct using:
Quote: colorMode(HSB, 255);
I guess that somewhere along the line the HSB default doesn'y get implemented. If this is an intentional change it might be worth altering the description of colorMode in the help to reflect this.
The same issue can be illustrated with 'set' using:
Quote:colorMode(HSB); //fails ...
//colorMode(HSB, 255); //works!!!
color myColor = color(0,128,128 );
fill(0,128,128 );
rect(0,0,50,100);
fill(myColor);
rect(50,0,50,100);
for(int i = 0; i<100; i++){
set(i,i,myColor);
}
for(int i = 0; i<100; i++){
set(10,i,color(0,128,128 ));
}
Cheers,
reg