From 3a75b2571a1286770f2a153f494732cec51ce54e Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Thu, 25 Feb 2021 22:49:38 +0100 Subject: [PATCH] increase luminance threshold for better readability --- src/documents/serialisers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index 675bb464a..6ebf4c541 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -150,7 +150,7 @@ class TagSerializer(MatchingModelSerializer): 0.587 * math.pow(rgb[1], 2) + 0.114 * math.pow(rgb[2], 2) ) - return "#ffffff" if luminance < 0.5 else "#000000" + return "#ffffff" if luminance < 0.53 else "#000000" except ValueError: return "#000000"