diff options
author | Andrew Dolgov <[email protected]> | 2021-02-06 09:29:31 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-06 09:29:31 +0300 |
commit | 8b39e6bca74fd8452a1c74936103c0b35afe7101 (patch) | |
tree | 2ab2bb1b27d7c9a9696613bf43d31ea7c399a530 /include | |
parent | a544123b593f3c20d1bf6623ba61e5be61b47996 (diff) |
_color_pack: define variable before using
Diffstat (limited to 'include')
-rw-r--r-- | include/colors.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/colors.php b/include/colors.php index 2ad958e94..408f5aa9d 100644 --- a/include/colors.php +++ b/include/colors.php @@ -216,6 +216,7 @@ function _color_unpack($hex, $normalize = false) { ### Convert an RGB triplet to a hex color. function _color_pack($rgb, $normalize = false) { + $out = 0; foreach ($rgb as $k => $v) { $out |= (($v * ($normalize ? 255 : 1)) << (16 - $k * 8)); }return '#'. str_pad(dechex($out), 6, 0, STR_PAD_LEFT); |