about summary refs log tree commit diff
path: root/app/serializers/rest/keys
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-08-02 18:47:44 +0200
committerGitHub <noreply@github.com>2020-08-02 18:47:44 +0200
commit0ebc8d8626e3982696d1bb3876ec378a3bce81c9 (patch)
tree12b9080bb30f26f94883bd27176b5d958b35d2f9 /app/serializers/rest/keys
parent635b6a0f1af21bd4055f950930a681aa0a96535b (diff)
Fix thumbnail color extraction (#14464)
* Fix contrast calculation for thumbnail color extraction

Luminance calculation was using 0-255 RGB values instead of 0-1 sRGB values,
leading to incorrectly-computed contrast values.

Since we use ColorDiff already, just use its XYZ colorspace conversion code
to get the value.

* Require at least 3:1 contrast for both accent and foreground colors

* Lower required contrast for the accent color
Diffstat (limited to 'app/serializers/rest/keys')
0 files changed, 0 insertions, 0 deletions