Skip to content

Commit

Permalink
Reduce contrast between scope and item background colors
Browse files Browse the repository at this point in the history
Still seems enough, and decreases probability of ending up with difficult
to read text and background color combination.
  • Loading branch information
brechtvl committed Mar 5, 2023
1 parent e8c6878 commit 8a402d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/templates/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8a402d0

Please sign in to comment.