-
Notifications
You must be signed in to change notification settings - Fork 0
/
Animation.js
40 lines (36 loc) · 931 Bytes
/
Animation.js
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
function Animation(table) {
this.table = table;
}
Animation.colors = {
'-1': "rgb(205, 193, 180)",
0: "rgba(205, 193, 180,0)",
2: "#fbddb4",
4: "rgb(255, 191, 106)",
8: "rgb(236, 135, 0)",
16: "#ec931c",
32: "#f58b84",
64: "#fd4d40",
128: "#a844b9",
256: "#673AB7",
512: "#03A9F4",
1024: "#ead416",
2048: "#607D8B",
// 4096: "#4CAF50",
// 8192: "#CDDC39",
// 16384: "#FFEB3B",
// 32768: "#FF9800",
// 65536: "#FF5722",
'other': "#795548",
};
Animation.getFontColor = (val) => {
if (typeof Animation.colors[val] === 'undefined') {
return main.getConTrastColor(Animation.colors['other']).color;
}
return main.getConTrastColor(Animation.colors[val]).color;
}
Animation.getColor = (val) => {
if (typeof Animation.colors[val] === 'undefined') {
return Animation.colors['other'];
}
return Animation.colors[val];
}