aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorStephen Kent2015-03-05 14:56:16 -0800
committerPim van den Berg2015-06-22 10:49:45 +0200
commit3fb99cfe184d90332263f862a14e69a6ffeb4449 (patch)
tree3c1278c3753ec5ffd2f45ba2243f63e81dcedf4b /type
parentDon't show overlap AREA on Generic IO graphs when negative_io is set (diff)
downloadapt-panopticon_cgp-3fb99cfe184d90332263f862a14e69a6ffeb4449.zip
apt-panopticon_cgp-3fb99cfe184d90332263f862a14e69a6ffeb4449.tar.gz
apt-panopticon_cgp-3fb99cfe184d90332263f862a14e69a6ffeb4449.tar.bz2
apt-panopticon_cgp-3fb99cfe184d90332263f862a14e69a6ffeb4449.tar.xz
Bug fix in get_faded_color
Diffstat (limited to 'type')
-rw-r--r--type/Base.class.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/type/Base.class.php b/type/Base.class.php
index 8d51121..4b23eaf 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -131,8 +131,9 @@ class Type_Base {
131 131
132 foreach ($rgb as $pri) { 132 foreach ($rgb as $pri) {
133 $c[$pri] = dechex(round($percent * $fg[$pri]) + ((1.0 - $percent) * $bg[$pri])); 133 $c[$pri] = dechex(round($percent * $fg[$pri]) + ((1.0 - $percent) * $bg[$pri]));
134 if ($c[$pri] == '0') 134 if (strlen($c[$pri]) == 1) {
135 $c[$pri] = '00'; 135 $c[$pri] = '0' . $c[$pri];
136 }
136 } 137 }
137 138
138 return $c['r'].$c['g'].$c['b']; 139 return $c['r'].$c['g'].$c['b'];