Commit 18724f63 authored by Jérôme Nadaud's avatar Jérôme Nadaud

Merge pull request #2397 from PrestaEdit/patch-93

[-] Class: Tools / getBrightness: hack to have a readable color if backg...
parents bbc92823 fe41fede
......@@ -1859,6 +1859,9 @@ class ToolsCore
public static function getBrightness($hex)
{
if (Tools::strtolower($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