|
|
@ -230,9 +230,9 @@ class MatHelper{ |
|
|
|
static function hex2floatColor($hexColor){ |
|
|
|
$floatColor = ''; |
|
|
|
$hexColor = trim($hexColor); |
|
|
|
$r = hexdec(substr($hexColor, 1, 2))/255; |
|
|
|
$g = hexdec(substr($hexColor, 3, 2))/255; |
|
|
|
$b = hexdec(substr($hexColor, 5, 2))/255; |
|
|
|
$r = (hexdec(substr($hexColor, 1, 2))/255) ** (1/2.2); |
|
|
|
$g = hexdec(substr($hexColor, 3, 2))/255 ** (1/2.2); |
|
|
|
$b = hexdec(substr($hexColor, 5, 2))/255 ** (1/2.2); |
|
|
|
$floatColor = "$r $g $b"; |
|
|
|
return $floatColor; |
|
|
|
} |
|
|
|