diff options
Diffstat (limited to 'apps/theming/lib/Util.php')
-rw-r--r-- | apps/theming/lib/Util.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index f0ce30ac5ba..71ed0958e42 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -29,8 +29,8 @@ class Util { * @param string $color rgb color value * @return bool */ - public static function invertTextColor($color) { - $l = self::calculateLuminance($color); + public function invertTextColor($color) { + $l = $this->calculateLuminance($color); if($l>0.5) { return true; } else { @@ -44,8 +44,8 @@ class Util { * @param $color * @return string */ - public static function elementColor($color) { - $l = self::calculateLuminance($color); + public function elementColor($color) { + $l = $this->calculateLuminance($color); if($l>0.8) { return '#555555'; } else { @@ -57,7 +57,7 @@ class Util { * @param string $color rgb color value * @return float */ - public static function calculateLuminance($color) { + public function calculateLuminance($color) { $hex = preg_replace("/[^0-9A-Fa-f]/", '', $color); if (strlen($hex) === 3) { $hex = $hex{0} . $hex{0} . $hex{1} . $hex{1} . $hex{2} . $hex{2}; @@ -75,7 +75,7 @@ class Util { * @param $color * @return string base64 encoded radio button svg */ - public static function generateRadioButton($color) { + public function generateRadioButton($color) { $radioButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">' . '<path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6 6 6 0 0 1 6-6zm0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8z" fill="'.$color.'"/></svg>'; return base64_encode($radioButtonIcon); |