String retval = (String)COLOR_MAP.get( value.toLowerCase() ); if ( retval == null ) { if ( value.indexOf( "rgb" ) >= 0 ) {
String retval = (String) COLOR_MAP.get(value.toLowerCase()); if (retval == null) { if (value.trim().startsWith("rgb(")) {
    public static String getColorHex( String value ) {        if ( value == null ) {            throw new XRRuntimeException( "value is null on getColorHex()" );        }        String retval = (String)COLOR_MAP.get( value.toLowerCase() );        if ( retval == null ) {            if ( value.indexOf( "rgb" ) >= 0 ) {                retval = value;            } else {                Matcher m = COLOR_HEX_PATTERN.matcher( value );                if ( m.matches() ) {                    retval = value;                }            }        }        if ( retval == null ) {            System.out.println( "!!! can't identify specified color:" + value );        }        return retval;    }