diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 635c002611221..5a4dd115f7f38 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -82,6 +82,11 @@ public function isBrightColor(string $color): bool { * @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) {