Commit aa68a8b3 authored by PrestaEdit's avatar PrestaEdit

[-] Class: Tools / getBrightness: hack to have a readable color if background is transparent

parent bbc92823
......@@ -1859,6 +1859,9 @@ class ToolsCore
public static function getBrightness($hex)
{
if ($hex == 'transparent')
return '129';
$hex = str_replace('#', '', $hex);
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment