From dc40dcb3693d8af0c175a627a3814d9a666fab41 Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6?= Date: Tue, 21 May 2024 16:18:52 +0200 Subject: [PATCH] fix(theming): stable 27 disable accessible color config switch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/theming/lib/Util.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 635c0026112..5a4dd115f7f 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -82,6 +82,11 @@ class Util { * @return string */ public function elementColor($color, ?bool $brightBackground = null) { + // Disable color luminance check if the feature is disabled. 27 ONLY! + if ($this->config->getSystemValueBool('27-disable-accessible-theming-color') === true) { + return $color; + } + $luminance = $this->calculateLuminance($color); if ($brightBackground !== false && $luminance > 0.8) { -- 2.39.5