|
@ -142,10 +142,11 @@ class MatHelper{ |
|
|
static function hex2floatColor($hexColor){ |
|
|
static function hex2floatColor($hexColor){ |
|
|
$floatColor = ''; |
|
|
$floatColor = ''; |
|
|
$hexColor = trim($hexColor); |
|
|
$hexColor = trim($hexColor); |
|
|
$r = hexdec(substr($hexColor, 1, 2))/256; |
|
|
|
|
|
$g = hexdec(substr($hexColor, 3, 2))/256; |
|
|
|
|
|
$b = hexdec(substr($hexColor, 5, 2))/256; |
|
|
|
|
|
$floatColor = `$r $g $b`; |
|
|
|
|
|
|
|
|
$r = hexdec(substr($hexColor, 1, 2))/255; |
|
|
|
|
|
$g = hexdec(substr($hexColor, 3, 2))/255; |
|
|
|
|
|
$b = hexdec(substr($hexColor, 5, 2))/255; |
|
|
|
|
|
$floatColor = "$r $g $b"; |
|
|
|
|
|
echo "\n$floatColor"; |
|
|
return $floatColor; |
|
|
return $floatColor; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|