Skip to content

Commit

Permalink
Merge pull request #45422 from nextcloud/skjnldsv-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored May 21, 2024
2 parents 9948dcc + dc40dcb commit 51adff2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/theming/lib/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 51adff2

Please sign in to comment.