scoresaber-reloadedv3/src/common/song-utils.ts

23 lines
488 B
TypeScript
Raw Normal View History

2024-09-11 22:10:16 +00:00
/**
2024-09-11 23:35:54 +00:00
* Turns the difficulty of a song into a color
2024-09-11 22:10:16 +00:00
*
2024-09-11 23:35:54 +00:00
* @param diff the difficulty to get the color for
* @returns the color for the difficulty
2024-09-11 22:10:16 +00:00
*/
2024-09-11 23:35:54 +00:00
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";
2024-09-11 22:10:16 +00:00
}
}