List of utility methods to do Terminal Color Output
String | colorise(final char alt, final String message) colorise final char[] b = message.toCharArray(); for (int i = 0; i < (b.length - 1); i++) { if ((b[i] == alt) && ("0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[(i + 1)]) > -1)) { b[i] = '\u00A7'; b[(i + 1)] = Character.toLowerCase(b[(i + 1)]); return new String(b); ... |
String | colorize(String color, String str) colorize return color + str + RESET;
|
String | colorize(String original) Converts color codes into the simoleon code. return original.replace("<black>", "\u00A70").replace("<navy>", "\u00A71").replace("<green>", "\u00A72") .replace("<teal>", "\u00A73").replace("<red>", "\u00A74").replace("<purple>", "\u00A75") .replace("<gold>", "\u00A76").replace("<silver>", "\u00A77").replace("<gray>", "\u00A78") .replace("<blue>", "\u00A79").replace("<lime>", "\u00A7a").replace("<aqua>", "\u00A7b") .replace("<rose>", "\u00A7c").replace("<pink>", "\u00A7d").replace("<yellow>", "\u00A7e") .replace("<white>", "\u00A7f"); |
String | colorize(String string) colorize return string.replaceAll("(?i)&([a-k0-9])", "\u00A7$1"); |
String | colorizeBackground(String str, String color) Creates a string with the given backgroundcolor. return INTERNAL_MARKER + color.toLowerCase() + str + INTERNAL_MARKER + RESET_ALL;
|
String | colorizeBackground(String str, String color) colorize Background return INTERNAL_MARKER + color.toLowerCase() + str + INTERNAL_MARKER + RESET_ALL;
|
String | colorizeBackground(String str, String color, boolean autoff) Creates a string with the given backgroundcolor. if (autoff) { return colorizeBackground(str, color); } else { return INTERNAL_MARKER + color.toLowerCase() + str; |
String | colorizeSequence(String cigar, String seq) colorize Sequence String[] letter = cigar.replaceAll("[0-9]", "").split(""); String[] nums = cigar.split("[MIDNSHPX]"); int index = 0; String htmlEmbedded = ""; for (int i = 0; i < nums.length; i++) { int tail = Integer.parseInt(nums[i]) + index; if (letter[i + 1].equals("M")) { htmlEmbedded += seq.substring(index, tail); ... |
String | colorizeText(String str, String color) colorize Text return INTERNAL_MARKER + color + str + INTERNAL_MARKER + RESET_ALL;
|
String | colorizeText(String str, String color) Creates a string with the given textcolor. return INTERNAL_MARKER + color + str + INTERNAL_MARKER + RESET_ALL;
|