diff options
author | Stephen Kent | 2015-03-05 14:56:16 -0800 |
---|---|---|
committer | Pim van den Berg | 2015-06-22 10:49:45 +0200 |
commit | 3fb99cfe184d90332263f862a14e69a6ffeb4449 (patch) | |
tree | 3c1278c3753ec5ffd2f45ba2243f63e81dcedf4b /type | |
parent | Don't show overlap AREA on Generic IO graphs when negative_io is set (diff) | |
download | apt-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.php | 5 |
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']; |