単色では飽きるので色をランダムに変更

Closes #11
This commit is contained in:
yuukiwww 2024-09-26 11:40:50 +00:00
parent b619710ee9
commit b165a6e39b

View File

@ -17,6 +17,11 @@ class SongSelect{
this.canvas.style.imageRendering = "pixelated" this.canvas.style.imageRendering = "pixelated"
} }
let rand = () => {
let color = Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0");
return `#${color}`
}
this.songSkin = { this.songSkin = {
"selected": { "selected": {
background: "#ffdb2c", background: "#ffdb2c",
@ -85,10 +90,10 @@ class SongSelect{
}, },
"default": { "default": {
sort: null, sort: null,
background: "rgba(0,0,0,0)", background: `${rand()}`,
border: ["rgba(255,127,212,.8)", "rgba(255,0,255,.6)"], border: [`${rand()}`, `${rand()}`],
outline: "rgba(0,0,0,.4)", outline: `#000000`,
infoFill: "rgba(0,0,0,0)" infoFill: `${rand()}`
} }
} }