Skip to content

Commit

Permalink
ui: improve score colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Apr 26, 2024
1 parent 3a985db commit fb8561c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/lib/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export function getRequirementTitle(ref_id: string, name: string) {
export function displayScoreColor(value: number, max_score: number) {
value = (value * 100) / max_score;
if (value < 25) {
return 'stroke-red-500';
return 'stroke-red-400';
}
if (value < 50) {
return 'stroke-orange-500';
return 'stroke-orange-400';
}
if (value < 75) {
return 'stroke-yellow-500';
return 'stroke-yellow-300';
}
return 'stroke-green-500';
return 'stroke-green-300';
}

export function formatScoreValue(value: number, max_score: number) {
Expand Down

0 comments on commit fb8561c

Please sign in to comment.