aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-12-14 17:58:13 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-12-21 17:07:02 +0100
commit87c48b424cd64d3e8f320f99a8d6af7ff70db116 (patch)
treee9797b65044643294c990e6e09849e293c48bb76 /apps/theming/lib
parent2f25f2feed0583cd1720aae4c6675ada829a991c (diff)
downloadnextcloud-server-87c48b424cd64d3e8f320f99a8d6af7ff70db116.tar.gz
nextcloud-server-87c48b424cd64d3e8f320f99a8d6af7ff70db116.zip
fix(theming): Make dark theme accessible and add unit test
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Themes/DarkTheme.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php
index d33f13dc579..0fed06e2225 100644
--- a/apps/theming/lib/Themes/DarkTheme.php
+++ b/apps/theming/lib/Themes/DarkTheme.php
@@ -60,10 +60,10 @@ class DarkTheme extends DefaultTheme implements ITheme {
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
$colorBoxShadowRGB = join(',', $this->util->hexToRGB($colorBoxShadow));
- $colorError = '#ee312b';
- $colorWarning = '#c28900';
- $colorSuccess = '#36914e';
- $colorInfo = '#007bbd';
+ $colorError = '#FF5252';
+ $colorWarning = '#FFCC00';
+ $colorSuccess = '#50BB50';
+ $colorInfo = '#00AEFF';
return array_merge(
$defaultVariables,
@@ -72,6 +72,7 @@ class DarkTheme extends DefaultTheme implements ITheme {
'--color-main-text' => $colorMainText,
'--color-main-background' => $colorMainBackground,
'--color-main-background-rgb' => $colorMainBackgroundRGB,
+ '--color-main-background-blur' => 'rgba(var(--color-main-background-rgb), .85)',
'--color-scrollbar' => $this->util->lighten($colorMainBackground, 15),
@@ -84,26 +85,26 @@ class DarkTheme extends DefaultTheme implements ITheme {
'--color-text-maxcontrast' => $colorTextMaxcontrast,
'--color-text-maxcontrast-default' => $colorTextMaxcontrast,
- '--color-text-maxcontrast-background-blur' => $this->util->lighten($colorTextMaxcontrast, 2),
+ '--color-text-maxcontrast-background-blur' => $this->util->lighten($colorTextMaxcontrast, 6),
'--color-text-light' => 'var(--color-main-text)', // deprecated
'--color-text-lighter' => 'var(--color-text-maxcontrast)', // deprecated
'--color-error' => $colorError,
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
- '--color-error-hover' => $this->util->mix($colorError, $colorMainBackground, 85),
- '--color-error-text' => $this->util->lighten($colorError, 12),
+ '--color-error-hover' => $this->util->lighten($colorError, 10),
+ '--color-error-text' => $this->util->lighten($colorError, 10),
'--color-warning' => $colorWarning,
'--color-warning-rgb' => join(',', $this->util->hexToRGB($colorWarning)),
- '--color-warning-hover' => $this->util->mix($colorWarning, $colorMainBackground, 60),
+ '--color-warning-hover' => $this->util->lighten($colorWarning, 10),
'--color-warning-text' => $colorWarning,
'--color-success' => $colorSuccess,
'--color-success-rgb' => join(',', $this->util->hexToRGB($colorSuccess)),
- '--color-success-hover' => $this->util->mix($colorSuccess, $colorMainBackground, 85),
- '--color-success-text' => $this->util->lighten($colorSuccess, 6),
+ '--color-success-hover' => $this->util->lighten($colorSuccess, 10),
+ '--color-success-text' => $colorSuccess,
'--color-info' => $colorInfo,
'--color-info-rgb' => join(',', $this->util->hexToRGB($colorInfo)),
- '--color-info-hover' => $this->util->mix($colorInfo, $colorMainBackground, 85),
- '--color-info-text' => $this->util->lighten($colorInfo, 9),
+ '--color-info-hover' => $this->util->lighten($colorInfo, 10),
+ '--color-info-text' => $colorInfo,
// used for the icon loading animation
'--color-loading-light' => '#777',