public static ColorOwn forString(String colorString,int transparency){
  boolean error=false;
  ColorOwn returnColor=null;
  if (colorString == null) {
    error=true;
  }
 else {
    for (    Entry<String,ColorOwn> c : COLOR_MAP.entrySet()) {
      if (colorString.equalsIgnoreCase(c.getKey())) {
        returnColor=c.getValue();
        break;
      }
    }
    if (returnColor == null) {
      try {
        returnColor=new ColorOwn(colorString);
      }
 catch (      NumberFormatException e) {
        error=true;
      }
    }
    if (returnColor != null) {
      returnColor=returnColor.transparency(transparency);
    }
  }
  if (error) {
    throw new StyleException("value must be a " + EXAMPLE_TEXT);
  }
  return returnColor;
}

public static ColorOwn forString ( String colorString , int transparency ) { boolean error = false ; ColorOwn returnColor = null ; if ( colorString == null ) { error = true ; } else { for ( Entry < String , ColorOwn > c : COLOR_MAP . entrySet ( ) ) { if ( colorString . equalsIgnoreCase ( c . getKey ( ) ) ) { returnColor = c . getValue ( ) ; break ; } } if ( returnColor == null ) { try { returnColor = new ColorOwn ( colorString ) ; } catch ( NumberFormatException e ) { error = true ; } } if ( returnColor != null ) { returnColor = returnColor . transparency ( transparency ) ; } } if ( error ) { throw new StyleException ( "value must be a " + EXAMPLE_TEXT ) ; } return returnColor ; }
converts colorstring into a color which is available in the colormap or if not tries to decode the colorstring
