Here you can find the source of colorise(final char alt, final String message)
public static String colorise(final char alt, final String message)
//package com.java2s; // it under the terms of the GNU General Public License as published by / public class Main { public static String colorise(final char alt, final String message) { 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)]); }/*from w w w . j a v a 2 s .co m*/ } return new String(b); } }