From 187ff8358476e53cdd34a45843dbf2f0eb427ed9 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Mon, 5 Jun 2023 17:28:19 -0700 Subject: enh(theming): Success contrast Signed-off-by: Christopher Ng --- apps/theming/css/default.css | 7 ++++--- apps/theming/lib/Themes/DarkTheme.php | 5 +++++ apps/theming/lib/Themes/DefaultTheme.php | 8 +++++--- 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css index cb4a12fce10..4b6c7cd6099 100644 --- a/apps/theming/css/default.css +++ b/apps/theming/css/default.css @@ -25,9 +25,10 @@ --color-warning-rgb: 194,137,0; --color-warning-hover: #cea032; --color-warning-text: #996c00; - --color-success: #46ba61; - --color-success-rgb: 70,186,97; - --color-success-hover: #6ac780; + --color-success: #3fa857; + --color-success-rgb: 63,168,87; + --color-success-hover: #65b978; + --color-success-text: #318344; --color-info: #006aa3; --color-info-rgb: 0,106,163; --color-info-hover: #3287b5; diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php index 85e4d4708cc..0d40bda6b09 100644 --- a/apps/theming/lib/Themes/DarkTheme.php +++ b/apps/theming/lib/Themes/DarkTheme.php @@ -61,6 +61,7 @@ class DarkTheme extends DefaultTheme implements ITheme { $colorError = '#e9322d'; $colorWarning = '#c28900'; + $colorSuccess = '#3fa857'; return array_merge( $defaultVariables, @@ -93,6 +94,10 @@ class DarkTheme extends DefaultTheme implements ITheme { '--color-warning-rgb' => join(',', $this->util->hexToRGB($colorWarning)), '--color-warning-hover' => $this->util->mix($colorWarning, $colorMainBackground, 60), '--color-warning-text' => $colorWarning, + '--color-success' => $colorSuccess, + '--color-success-rgb' => join(',', $this->util->hexToRGB($colorSuccess)), + '--color-success-hover' => $this->util->mix($colorSuccess, $colorMainBackground, 60), + '--color-success-text' => $colorSuccess, // used for the icon loading animation '--color-loading-light' => '#777', diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 3238ed00564..432dc900182 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -111,6 +111,7 @@ class DefaultTheme implements ITheme { $colorError = '#e9322d'; $colorWarning = '#c28900'; + $colorSuccess = '#3fa857'; $variables = [ '--color-main-background' => $colorMainBackground, @@ -149,9 +150,10 @@ class DefaultTheme implements ITheme { '--color-warning-rgb' => join(',', $this->util->hexToRGB($colorWarning)), '--color-warning-hover' => $this->util->mix($colorWarning, $colorMainBackground, 60), '--color-warning-text' => $this->util->darken($colorWarning, 8), - '--color-success' => '#46ba61', - '--color-success-rgb' => join(',', $this->util->hexToRGB('#46ba61')), - '--color-success-hover' => $this->util->mix('#46ba61', $colorMainBackground, 60), + '--color-success' => $colorSuccess, + '--color-success-rgb' => join(',', $this->util->hexToRGB($colorSuccess)), + '--color-success-hover' => $this->util->mix($colorSuccess, $colorMainBackground, 60), + '--color-success-text' => $this->util->darken($colorSuccess, 10), '--color-info' => '#006aa3', '--color-info-rgb' => join(',', $this->util->hexToRGB('#006aa3')), '--color-info-hover' => $this->util->mix('#006aa3', $colorMainBackground, 60), -- cgit v1.2.3