summaryrefslogtreecommitdiff
path: root/include/colors.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-06 09:29:31 +0300
committerAndrew Dolgov <[email protected]>2021-02-06 09:29:31 +0300
commit8b39e6bca74fd8452a1c74936103c0b35afe7101 (patch)
tree2ab2bb1b27d7c9a9696613bf43d31ea7c399a530 /include/colors.php
parenta544123b593f3c20d1bf6623ba61e5be61b47996 (diff)
_color_pack: define variable before using
Diffstat (limited to 'include/colors.php')
-rw-r--r--include/colors.php1
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);