From d64a63abc68ec50530b7b0cbf21cec9c31e1e178 Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6?= Date: Fri, 20 May 2022 08:42:32 +0200 Subject: [PATCH] Properly calculate primary element based on background luminance MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/theming/lib/Themes/DarkTheme.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php index f5463d94fc4..1241d1d42c3 100644 --- a/apps/theming/lib/Themes/DarkTheme.php +++ b/apps/theming/lib/Themes/DarkTheme.php @@ -71,8 +71,10 @@ class DarkTheme extends DefaultTheme implements ITheme { '--color-primary-hover' => $this->util->mix($this->primaryColor, $colorMainBackground, 60), '--color-primary-light' => $this->util->mix($this->primaryColor, $colorMainBackground, -80), - '--color-primary-element-hover' => $this->util->mix($this->util->elementColor($this->primaryColor), $colorMainBackground, 80), - '--color-primary-element-lighter' => $this->util->mix($this->util->elementColor($this->primaryColor), $colorMainBackground, -70), + '--color-primary-element' => $this->util->elementColor($this->primaryColor, false), + '--color-primary-element-hover' => $this->util->mix($this->util->elementColor($this->primaryColor, false), $colorMainBackground, 80), + '--color-primary-element-light' => $this->util->lighten($this->util->elementColor($this->primaryColor, false), 15), + '--color-primary-element-lighter' => $this->util->mix($this->util->elementColor($this->primaryColor, false), $colorMainBackground, -70), '--color-text-maxcontrast' => $this->util->darken($colorMainText, 30), '--color-text-light' => $this->util->darken($colorMainText, 10), -- 2.39.5