Apply some customization
This commit is contained in:
parent
791b998489
commit
3c806a5b2b
6 changed files with 49 additions and 29 deletions
|
@ -205,7 +205,7 @@ function _color_unpack($hex, $normalize = false) {
|
|||
|
||||
if (strlen($hex) == 4) {
|
||||
$hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3];
|
||||
} $c = hexdec($hex);
|
||||
} $c = hexdec(ltrim($hex, '#'));
|
||||
for ($i = 16; $i >= 0; $i -= 8) {
|
||||
$out[] = (($c >> $i) & 0xFF) / ($normalize ? 255 : 1);
|
||||
} return $out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue