diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php index 57d49ff42311d..7b82136a56a48 100644 --- a/apps/theming/lib/Themes/DarkHighContrastTheme.php +++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php @@ -56,13 +56,15 @@ public function getCSSVariables(): array { $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-translucent' => 'rgba(var(--color-main-background-rgb), .1)', + '--color-main-background-rgb' => $colorMainBackgroundRGB, + '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, '--color-background-dark' => $this->util->lighten($colorMainBackground, 30), diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index d73fa4b7ea0c4..1ae848c866f3e 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -56,13 +56,15 @@ public function getCSSVariables(): array { $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-translucent' => 'rgba(var(--color-main-background-rgb), .1)', + '--color-main-background-rgb' => $colorMainBackgroundRGB, + '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, '--color-background-dark' => $this->util->darken($colorMainBackground, 30),