diff --git a/file/lib/util/ChatUtil.class.php b/file/lib/util/ChatUtil.class.php
index 8bb396c..77ac7ed 100644
--- a/file/lib/util/ChatUtil.class.php
+++ b/file/lib/util/ChatUtil.class.php
@@ -23,15 +23,17 @@ class ChatUtil {
*/
public static function gradient($string, $start, $end) {
$string = str_split($string);
- $r = (int) ((($start >> 16 & 255) - ($end >> 16 & 255)) / (count($string) - 1));
- $g = (int) ((($start >> 8 & 255) - ($end >> 8 & 255)) / (count($string) - 1));
- $b = (int) ((($start & 255) - ($end & 255)) / (count($string) - 1));
+ $r = (int) ((($start & 0xFF0000) - ($end & 0xFF0000)) / (count($string) - 1));
+ $g = (int) ((($start & 0x00FF00) - ($end & 0x00FF00)) / (count($string) - 1));
+ $b = (int) ((($start & 0x0000FF) - ($end & 0x0000FF)) / (count($string) - 1));
$result = '';
for ($i = 0, $max = count($string); $i < $max; $i++) {
- $result .= ''.$string[$i].'';
+ $result .= ''.$string[$i].'';
}
return $result;
}
+
+
}