]> source.dussan.org Git - nextcloud-server.git/commitdiff
Properly calculate primary element based on background luminance 32509/head
authorJohn Molakvoæ <skjnldsv@protonmail.com>
Fri, 20 May 2022 06:42:32 +0000 (08:42 +0200)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Fri, 20 May 2022 06:42:32 +0000 (08:42 +0200)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
apps/theming/lib/Themes/DarkTheme.php

index f5463d94fc4a967f9fed39f1032695826d206144..1241d1d42c3004ce3303c62c68cd211f1435801a 100644 (file)
@@ -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),