From 5e2c5e5fb6242164e34141d170f4670e64daf5ee Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 12 Oct 2022 11:59:16 +0200 Subject: [PATCH] fix color-main-background-rgb Signed-off-by: szaimen --- apps/theming/lib/Themes/DarkHighContrastTheme.php | 2 ++ apps/theming/lib/Themes/HighContrastTheme.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php index cde6239b186..7b82136a56a 100644 --- a/apps/theming/lib/Themes/DarkHighContrastTheme.php +++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php @@ -56,12 +56,14 @@ class DarkHighContrastTheme extends DarkTheme implements ITheme { $colorMainText = '#ffffff'; $colorMainBackground = '#000000'; + $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground)); return array_merge( $defaultVariables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, + '--color-main-background-rgb' => $colorMainBackgroundRGB, '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index d99cc85f376..1ae848c866f 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -56,12 +56,14 @@ class HighContrastTheme extends DefaultTheme implements ITheme { $colorMainText = '#000000'; $colorMainBackground = '#ffffff'; + $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground)); return array_merge( $defaultVariables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, + '--color-main-background-rgb' => $colorMainBackgroundRGB, '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, -- 2.39.5