feat(overlay): add rank colors to score stats
All checks were successful
deploy / deploy (push) Successful in 57s

This commit is contained in:
Lee
2023-11-05 22:30:33 +00:00
parent fadfdee316
commit fb2b72875f
2 changed files with 23 additions and 1 deletions

View File

@ -15,6 +15,20 @@ export function songDifficultyToColor(diff: string) {
}
}
export function accuracyToColor(acc: number) {
if (acc >= 90) {
return "rgb(0, 255, 255)";
} else if (acc >= 80) {
return "rgb(255, 255, 255)";
} else if (acc >= 70) {
return "rgb(0, 255, 0)";
} else if (acc >= 60) {
return "rgb(255, 235, 4)";
} else {
return "rgb(255, 0, 0)";
}
}
export function scoresaberDifficultyNumberToName(
diff: number,
shortened: boolean = false,