gbmusic: fix dynamic track/album colors
Not really broken, just didn't do what it saidmaster
parent
1c1e73720a
commit
546b5e819a
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: Initial version
|
0.01: Initial version
|
||||||
0.02: Increase text brightness, improve controls, (try to) reduce memory usage
|
0.02: Increase text brightness, improve controls, (try to) reduce memory usage
|
||||||
0.03: Only auto-start if active app is a clock, auto close after 1 hour of inactivity
|
0.03: Only auto-start if active app is a clock, auto close after 1 hour of inactivity
|
||||||
|
0.04: Minor bugfix
|
||||||
|
|
|
||||||
|
|
@ -138,16 +138,13 @@ function infoColor(name) {
|
||||||
s = 0;
|
s = 0;
|
||||||
} else {
|
} else {
|
||||||
// make color depend deterministically on info
|
// make color depend deterministically on info
|
||||||
let code = 0;
|
let code = textCode(info[name]);
|
||||||
switch(name) {
|
switch(name) {
|
||||||
case "track":
|
case "track": // also use album
|
||||||
code += textCode(info.track);
|
|
||||||
// fallthrough: also use album+artist
|
|
||||||
case "album":
|
|
||||||
code += textCode(info.album);
|
code += textCode(info.album);
|
||||||
// fallthrough: also use artist
|
// fallthrough
|
||||||
default:
|
case "album": // also use artist
|
||||||
code += textCode(info[name]);
|
code += textCode(info.artist);
|
||||||
}
|
}
|
||||||
h = code%360;
|
h = code%360;
|
||||||
s = 0.7;
|
s = 0.7;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue