<commit_before>package in.twizmwaz.cardinal.util;

import org.bukkit.ChatColor;
import org.bukkit.Color;

public class MiscUtils {

    public static Color convertChatColorToColor(ChatColor chatColor) {
        if (chatColor.isColor()) {
            switch (chatColor) {
                case AQUA:
                    return Color.fromRGB(0, 255, 255);
                case BLACK:
                    return Color.fromRGB(0, 0, 0);
                case BLUE:
                    return Color.fromRGB(128, 128, 255);
                case DARK_AQUA:
                    return Color.fromRGB(0, 128, 128);
                case DARK_BLUE:
                    return Color.fromRGB(0, 0, 255);
                case DARK_GRAY:
                    return Color.fromRGB(64, 64, 64);
                case DARK_GREEN:
                    return Color.fromRGB(0, 128, 0);
                case DARK_PURPLE:
                    return Color.fromRGB(128, 0, 128);
                case DARK_RED:
                    return Color.fromRGB(192, 0, 0);
                case GOLD:
                    return Color.fromRGB(192, 0, 0);
                case GRAY:
                    return Color.fromRGB(196, 0, 0);
                case GREEN:
                    return Color.fromRGB(255, 196, 0);
                case LIGHT_PURPLE:
                    return Color.fromRGB(255, 0, 255);
                case RED:
                    return Color.fromRGB(255, 0, 0);
                case WHITE:
                    return Color.fromRGB(255, 255, 255);
                case YELLOW:
                    return Color.fromRGB(255, 255, 0);
                default:
                    return Color.fromRGB(128, 128, 128);
            }
        } else {
            return Color.fromBGR(128, 128, 128);
        }
    }
}<commit_msg>Fix chat color to armor color, fixes #92<commit_after>package in.twizmwaz.cardinal.util;

import org.bukkit.ChatColor;
import org.bukkit.Color;

public class MiscUtils {

    public static Color convertChatColorToColor(ChatColor chatColor) {
        if (chatColor.isColor()) {
            switch (chatColor) {
                case AQUA:
                    return Color.fromRGB(0, 255, 255);
                case BLACK:
                    return Color.fromRGB(0, 0, 0);
                case BLUE:
                    return Color.fromRGB(128, 128, 255);
                case DARK_AQUA:
                    return Color.fromRGB(0, 128, 128);
                case DARK_BLUE:
                    return Color.fromRGB(0, 0, 255);
                case DARK_GRAY:
                    return Color.fromRGB(64, 64, 64);
                case DARK_GREEN:
                    return Color.fromRGB(0, 128, 0);
                case DARK_PURPLE:
                    return Color.fromRGB(128, 0, 128);
                case DARK_RED:
                    return Color.fromRGB(192, 0, 0);
                case GOLD:
                    return Color.fromRGB(255, 128, 0);
                case GRAY:
                    return Color.fromRGB(196, 0, 0);
                case GREEN:
                    return Color.fromRGB(255, 196, 0);
                case LIGHT_PURPLE:
                    return Color.fromRGB(255, 0, 255);
                case RED:
                    return Color.fromRGB(255, 0, 0);
                case WHITE:
                    return Color.fromRGB(255, 255, 255);
                case YELLOW:
                    return Color.fromRGB(255, 255, 0);
                default:
                    return Color.fromRGB(128, 128, 128);
            }
        } else {
            return Color.fromBGR(128, 128, 128);
        }
    }
}
{'fraction_non_alphanumeric': 0.0868370431437208, 'fraction_numerical': 0.06540258312723275, 'mean_word_length': 1.1513002364066194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4736214', 'n_tokens_mistral': 1250, 'n_tokens_neox': 962, 'n_words': 255}