Merge pull request #45422 from nextcloud/skjnldsv-patch-1

This commit is contained in:
John Molakvoæ 2024-05-21 17:30:28 +02:00 committed by GitHub
commit 51adff2755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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