-
Notifications
You must be signed in to change notification settings - Fork 0
/
Colors.pde
executable file
·78 lines (74 loc) · 1.93 KB
/
Colors.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
void setColors(){
if(randomColors==true) colorsRandom();
else if(backgroundMode==1) colorsDark();
else colorsLight();
}
void setRandomColors(){
//Generate 13 Random Int Values from 0-255
for(i=0;i<15;i++){
randomValues[i]= int(random(255));
}
}
//RandomColorMode
void colorsRandom(){
background(randomValues[0],randomValues[13],randomValues[14]);
if(trackTime>45950 && colorChange == true){
switch (intensityStep) {
case 0:
stroke(randomValues[1],randomValues[2],randomValues[3]);
break;
case 1:
stroke(randomValues[4],randomValues[5],randomValues[6]); break;
case 2:
stroke(randomValues[7],randomValues[8],randomValues[9]); break;
case 3:
stroke(randomValues[10],randomValues[11],randomValues[12]); break;
}
}else{
stroke(randomValues[1],randomValues[2],randomValues[3]);
}
}
//BlackbackgroundMode
void colorsDark() {
background(0);
if(trackTime>45950 && colorChange == true){
switch (intensityStep) {
case 0:
stroke(220);
break;
case 1:
stroke(80, 40, 255);
break;
case 2:
stroke(50, 170, 180);
break;
case 3:
stroke(255, 70, 80);
break;
}
}else{
stroke(220);
}
}
//WhiteBackgroundMode
void colorsLight() {
background(255);
if(trackTime>45950 && colorChange == true){
switch (intensityStep) {
case 0:
stroke(0);
break;
case 1:
stroke(80, 40, 255);
break;
case 2:
stroke(50, 170, 180);
break;
case 3:
stroke(255, 70, 80);
break;
}
}else{
stroke(0);
}
}