color target clock

 

 

clair chin target clock

each section of my target changes color within a range gradually here’s 12:29-12:31.

 

targetgif

float secondHsbVal;

void setup() {
size(600, 600);
strokeWeight(35);
stroke(0);
}

void draw() {
colorMode(HSB,360,100,100);
background(0);
float s = map(second(), 0, 60,178, 302);
float m = map(minute(), 0, 60, 61, 245);
float h = map(hour(), 0, 24, 310, 160);
fill(s,54,99);
ellipse(300,300,600,600);
fill(m,75,99);
ellipse(300,300, 400, 400);
fill(h,73,99);
ellipse(300, 300,200, 200);
}

 

Comments are closed.