Skip to content

Instantly share code, notes, and snippets.

ChrisMCMine ChrisMCMine

Block or report user

Report or block ChrisMCMine

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ChrisMCMine /
Created May 23, 2015
Convert a String with Minecraft color codes ( to its html representation using <font color=...
private ArrayList<Pair<Integer, Character>> getColorCodes() {
ArrayList<Pair<Integer, Character>> colorCodes = new ArrayList<>();
colorCodes.add(new Pair<>(0x000000, '0'));
colorCodes.add(new Pair<>(0x0000AA, '1'));
colorCodes.add(new Pair<>(0x00AA00, '2'));
colorCodes.add(new Pair<>(0x00AAAA, '3'));
colorCodes.add(new Pair<>(0xAA0000, '4'));
colorCodes.add(new Pair<>(0xAA00AA, '5'));
colorCodes.add(new Pair<>(0xFFAA00, '6'));
You can’t perform that action at this time.