summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);