]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(theming): replace elementColor dark value with better contrast `#8c8c8c` 38063/head
authorJohn Molakvoæ <skjnldsv@protonmail.com>
Thu, 4 May 2023 10:51:02 +0000 (12:51 +0200)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Thu, 4 May 2023 12:41:19 +0000 (14:41 +0200)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
apps/theming/css/default.css
apps/theming/lib/Util.php
apps/theming/tests/CapabilitiesTest.php
apps/theming/tests/UtilTest.php

index 4cb9b85a293b94dfef4a45933e297dd95b8d417c..da9ad6e97deea44679421ab4031c879d39b9cbda 100644 (file)
   --color-primary-light: #e5f0f5;
   --color-primary-light-text: #002a41;
   --color-primary-light-hover: #dbe5ea;
-  --color-primary-element-text-dark: #ededed;
   --color-primary-element: #006aa3;
-  --color-primary-element-default-hover: #329bd3;
-  --color-primary-element-text: #ffffff;
   --color-primary-element-hover: #3287b5;
+  --color-primary-element-text: #ffffff;
   --color-primary-element-light: #e5f0f5;
-  --color-primary-element-light-text: #002a41;
   --color-primary-element-light-hover: #dbe5ea;
+  --color-primary-element-light-text: #002a41;
   --color-primary-element-text-dark: #ededed;
   --gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
   --image-background-default: url('/apps/theming/img/background/kamil-porembinski-clouds.jpg');
index e856802cb05e07431e5a58aaa5df5435a5449d97..f5321dada67dc7f3c3d1384d360bc9fe361dfba3 100644 (file)
@@ -91,7 +91,7 @@ class Util {
 
                if (!$brightBackground && $luminance < 0.2) {
                        // If the color is too dark in dark mode, we fall back to a brighter gray
-                       return '#555555';
+                       return '#8c8c8c';
                }
 
                return $color;
index 1de439a70e94af9eefc477cc68053cc969014c80..1c968383d53d2fb54b5355088803840e971ca08a 100644 (file)
@@ -111,7 +111,7 @@ class CapabilitiesTest extends TestCase {
                                'color-text' => '#ffffff',
                                'color-element' => '#000000',
                                'color-element-bright' => '#000000',
-                               'color-element-dark' => '#555555',
+                               'color-element-dark' => '#8c8c8c',
                                'logo' => 'http://localhost/logo5',
                                'background' => '#000000',
                                'background-plain' => true,
@@ -127,7 +127,7 @@ class CapabilitiesTest extends TestCase {
                                'color-text' => '#ffffff',
                                'color-element' => '#000000',
                                'color-element-bright' => '#000000',
-                               'color-element-dark' => '#555555',
+                               'color-element-dark' => '#8c8c8c',
                                'logo' => 'http://localhost/logo5',
                                'background' => '#000000',
                                'background-plain' => true,
index 8f6d972a2fc99ce2277643ae1c9ce21bb5135078..789107d9fdfb82544f24cb57de2275b66f22e5b1 100644 (file)
@@ -112,7 +112,7 @@ class UtilTest extends TestCase {
 
        public function testElementColorOnDarkBackground() {
                $elementColor = $this->util->elementColor("#000000", false);
-               $this->assertEquals('#555555', $elementColor);
+               $this->assertEquals('#8c8c8c', $elementColor);
        }
 
        public function testElementColorOnBrightBackground() {