From eb8770584e76886e8107837f9987c2ccfa82d516 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 10 May 2023 15:55:55 +0200 Subject: [PATCH] use brighten and darken instead of grey Signed-off-by: Simon L --- apps/theming/lib/Util.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 41ded251b0b..789da394567 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -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;