Skip to content

Commit 8136c36

Browse files
committed
Add color variable for text on blurred background
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 5709084 commit 8136c36

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/theming/lib/Themes/DefaultTheme.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public function getMediaQuery(): string {
9191
public function getCSSVariables(): array {
9292
$colorMainText = '#222222';
9393
$colorMainTextRgb = join(',', $this->util->hexToRGB($colorMainText));
94+
$colorTextMaxcontrast = $this->util->lighten($colorMainText, 33);
9495
$colorMainBackground = '#ffffff';
9596
$colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
9697
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
@@ -119,7 +120,8 @@ public function getCSSVariables(): array {
119120

120121
// max contrast for WCAG compliance
121122
'--color-main-text' => $colorMainText,
122-
'--color-text-maxcontrast' => $this->util->lighten($colorMainText, 33),
123+
'--color-text-maxcontrast' => $colorTextMaxcontrast,
124+
'--color-text-maxcontrast-background-blur' => $this->util->darken($colorTextMaxcontrast, 7),
123125
'--color-text-light' => $colorMainText,
124126
'--color-text-lighter' => $this->util->lighten($colorMainText, 33),
125127

0 commit comments

Comments
 (0)