Fix wrong zero padding of hex color in #1709
Found by manyrandomthings on #1715 Co-authored-by: manyrandomthings <42223559+manyrandomthings@users.noreply.github.com>
This commit is contained in:
1 parent
773e8722ca
commit
334f1060a5
1 file changed
+1
-1
@@ -102,7 +102,7 @@ public class HopperCounter
|
||||
this.color = color;
|
||||
String hexColor = Integer.toHexString(color.getTextColor());
|
||||
if (hexColor.length() < 6)
|
||||
hexColor = "0".repeat(hexColor.length() - 4) + hexColor;
|
||||
hexColor = "0".repeat(6 - hexColor.length()) + hexColor;
|
||||
this.coloredName = '#' + hexColor + ' ' + color.getName();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user