Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(theming): replace elementColor dark value with better contrast `#…
…8c8c8c`

Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv committed May 4, 2023
commit 4c71d8f8a418c1b2a2a1679b1f0fb2b8e221f651
6 changes: 2 additions & 4 deletions apps/theming/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@
--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');
Expand Down
2 changes: 1 addition & 1 deletion apps/theming/lib/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function elementColor($color, bool $brightBackground = true) {

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;
Expand Down
4 changes: 2 additions & 2 deletions apps/theming/tests/CapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function dataGetCapabilities() {
'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,
Expand All @@ -127,7 +127,7 @@ public function dataGetCapabilities() {
'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,
Expand Down
2 changes: 1 addition & 1 deletion apps/theming/tests/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function testElementColorDefault() {

public function testElementColorOnDarkBackground() {
$elementColor = $this->util->elementColor("#000000", false);
$this->assertEquals('#555555', $elementColor);
$this->assertEquals('#8c8c8c', $elementColor);
}

public function testElementColorOnBrightBackground() {
Expand Down