use brighten and darken instead of grey

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-05-10 15:55:55 +02:00
parent b70b1f66c9
commit eb8770584e

View file

@ -85,13 +85,13 @@ class Util {
$luminance = $this->calculateLuminance($color);
if ($brightBackground !== false && $luminance > 0.8) {
// If the color is too bright in bright mode, we fall back to a darker gray
return '#aaaaaa';
// If the color is too bright in bright mode, we fall back to a darkened color
return $this->darken($color, 30);
}
if ($brightBackground !== true && $luminance < 0.2) {
// If the color is too dark in dark mode, we fall back to a brighter gray
return '#8c8c8c';
// If the color is too dark in dark mode, we fall back to a brightened color
return $this->lighten($color, 30);
}
return $color;