From 8a402d0d6ff8aa4b79d8d00c6be29181e39cd87c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 5 Mar 2023 14:12:01 +0100 Subject: [PATCH] Reduce contrast between scope and item background colors Still seems enough, and decreases probability of ending up with difficult to read text and background color combination. --- modules/templates/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/templates/helper.go b/modules/templates/helper.go index b807713d55237..a9f945a0c871d 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -834,7 +834,7 @@ func RenderLabel(label *issues_model.Label) string { // Make scope and item background colors slightly darker and lighter respectively. // More contrast needed with higher luminance, empirically tweaked. luminance := (0.299*r + 0.587*g + 0.114*b) / 255 - contrast := 0.01 + luminance*0.06 + contrast := 0.01 + luminance*0.03 // Ensure we add the same amount of contrast also near 0 and 1. darken := contrast + math.Max(luminance+contrast-1.0, 0.0) lighten := contrast + math.Max(contrast-luminance, 0.0)