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) {