scoresaber-reloadedv3/src/common/song-utils.ts
Liam 65ad2147ab
All checks were successful
Deploy SSR / deploy (push) Successful in 1m11s
add tooltip and diff colors
2024-09-12 00:35:54 +01:00

23 lines
488 B
TypeScript

/**
* Turns the difficulty of a song into a color
*
* @param diff the difficulty to get the color for
* @returns the color for the difficulty
*/
export function songDifficultyToColor(diff: string) {
switch (diff.toLowerCase()) {
case "easy":
return "#3cb371";
case "normal":
return "#59b0f4";
case "hard":
return "#FF6347";
case "expert":
return "#bf2a42";
case "expert+":
return "#8f48db";
default:
return "gray";
}
}