diff options
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']; |