We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › lerpColor not working in 1.07 on OSX 10.5.8
Page Index Toggle Pages: 1
lerpColor not working in 1.07 on OSX 10.5.8 (Read 914 times)
lerpColor not working in 1.07 on OSX 10.5.8
Sep 15th, 2009, 6:49am
 
i wanted to make gradiating colors using lerpcolor but lerpcolor doesnt seem be working in 1.07. i had a friend run it in 1.05 and it worked so it must be that its not working in 1.07. try the code below...

Code:

int stepCount = 30;
color to, from;

void setup() {
 size(300, 300);
 from = color((int)random(255), (int)random(255), (int)random(255));
 to = color((int)random(255), (int)random(255), (int)random(255));
}

void draw() {
 fill(from);
 rect(0, 0, width/2, height/2);
 fill(to);
 rect(width/2, 0, width/2, height/2);
 
 for (int i = 0; i < stepCount; i++) {
   float step = (float) i/stepCount;
   println(step);
   fill(lerpColor(from, to, step));
   rect(i*(width/stepCount), height/2, (width/stepCount), height);
 }
}
Re: lerpColor not working in 1.07
Reply #1 - Sep 15th, 2009, 7:02am
 
it works in 1.06... and not 1.07...
Re: lerpColor not working in 1.07
Reply #2 - Sep 15th, 2009, 7:04am
 
Works on Linux. Are you using a Mac? There seems to be some issues with Processing 1.0.7 and Mac OS.
Re: lerpColor not working in 1.07 on OSX 10
Reply #3 - Sep 15th, 2009, 7:56am
 
yes i am on a mac running osx 10.5.8. im going to add that to the post subject...
Re: lerpColor not working in 1.07 on OSX 10.5.8
Reply #4 - Sep 15th, 2009, 8:44am
 
It is more probably an issue of display than of lerpColor itself, as it just does some simple math and bit shifting.
Page Index Toggle Pages: 1