Use text-reset if p=0.5

This commit is contained in:
ekzyis 2024-09-11 12:59:45 +02:00
parent 48bd8bc2b0
commit 2bdf74e57e
1 changed files with 5 additions and 2 deletions

View File

@ -103,12 +103,15 @@ func humanizeRound(f float64) string {
} }
func colorize(f float64) string { func colorize(f float64) string {
if f > 0.5 { eps := 1e-5
if f-0.5 > eps {
return "text-success" return "text-success"
} else { } else if 0.5-f > eps {
return "text-error" return "text-error"
} }
return "text-reset"
} }
func tabStyle(path string, tab string) string { func tabStyle(path string, tab string) string {