From b9c63e3e0bef82c888997d2491111292d7280eab Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Aug 2021 13:28:19 +0300 Subject: [PATCH] Increase minimum luminance level for dark text color from 50% to 65% --- badge.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/badge.go b/badge.go index ffc6c89..34f92e6 100644 --- a/badge.go +++ b/badge.go @@ -22,7 +22,7 @@ import ( // ////////////////////////////////////////////////////////////////////////////////// // // VERSION is current package version -const VERSION = "1.2.0" +const VERSION = "1.2.1" const ( COLOR_BLUE = "#007ec6" @@ -238,7 +238,7 @@ func formatFloat(v float64) string { func getMessageColors(badgeColor string) (string, string) { c := parseColor(badgeColor) - if c == 0 || calcLuminance(c) < 0.5 { + if c == 0 || calcLuminance(c) < 0.65 { return "#fff", "#010101" }