public static Color getColorByName(String colorName) {
        switch (colorName.toLowerCase()) {
        case COLOR_BLUE:
            return Color.blue;
        case COLOR_CYAN:
            return Color.cyan;
        case COLOR_DARKGRAY:
        case COLOR_DARKGREY:
            return Color.darkGray;
        case COLOR_GRAY:
        case COLOR_GREY:
            return Color.gray;
        case COLOR_LIGHTGRAY:
        case COLOR_LIGHTGREY:
            return Color.lightGray;
        case COLOR_GREEN:
            return Color.green;
        case COLOR_MAGENTA:
            return Color.magenta;
        case COLOR_ORANGE:
            return Color.orange;
        case COLOR_PINK:
            return Color.pink;
        case COLOR_RED:
            return Color.red;
        case COLOR_WHITE:
            return Color.white;
        case COLOR_YELLOW:
            return Color.yellow;
        case COLOR_BLACK:
        default:
            return Color.black;
        }
    }
public static Color getColorByName(String colorName) {
        switch (colorName.toLowerCase()) {
        case COLOR_BLUE:
            return Color.blue;
        case COLOR_CYAN:
            return Color.cyan;
        case COLOR_DARKGRAY:
        case COLOR_DARKGREY:
            return Color.darkGray;
        case COLOR_GRAY:
        case COLOR_GREY:
            return Color.gray;
        case COLOR_LIGHTGRAY:
        case COLOR_LIGHTGREY:
            return Color.lightGray;
        case COLOR_GREEN:
            return Color.green;
        case COLOR_MAGENTA:
            return Color.magenta;
        case COLOR_ORANGE:
            return Color.orange;
        case COLOR_PINK:
            return Color.pink;
        case COLOR_RED:
            return Color.red;
        case COLOR_WHITE:
            return Color.white;
        case COLOR_YELLOW:
            return Color.yellow;
        case COLOR_BLACK:
        default:
            return Color.black;
        }
    }
public static color getcolorbyname(string colorname) { switch (colorname.tolowercase()) { case color_blue: return color.blue; case color_cyan: return color.cyan; case color_darkgray: case color_darkgrey: return color.darkgray; case color_gray: case color_grey: return color.gray; case color_lightgray: case color_lightgrey: return color.lightgray; case color_green: return color.green; case color_magenta: return color.magenta; case color_orange: return color.orange; case color_pink: return color.pink; case color_red: return color.red; case color_white: return color.white; case color_yellow: return color.yellow; case color_black: default: return color.black; } }