lerpColor problem
in
Programming Questions
•
2 years ago
I think it should go from 60 to 360 counting upwards (in hue), but what it does is counting down i suppose cause i only get yellow, orange, red. Never blue green purple etc.
So i got this:
- color cStart;
- color cEnd;
- void setup(){
- colorMode(HSB, 360, 100, 100);
- cStart = color(60, 100, 100);
- cEnd = color(360, 100, 100);
- }
- void draw(){
- float amt = norm(frameCount % 360, 0, 359);
- color bgColor = lerpColor(cStart, cEnd, amt);
- background(bgColor);
- }
- void setup(){
- colorMode(HSB, 360, 100, 100);
- }
- void draw(){
- float h = map(frameCount % 360, 0, 359, 60, 360);
- color bgColor = color(h, 100, 100);
- background(bgColor);
- }
Why does lerpColor not get in that range?
1