code: public Color getAsColor(String attribute) {
  		if (!isColor(attribute)) {
  			throw new RuntimeException("Attribute "+attribute+" is not specified as a color:"+getAttribute(attribute));
  		}
  		
  		int col = Integer.parseInt(getAttribute(attribute).substring(1), 16);
  		
  		return new Color(col);
  	}
docs: Get an attribute value converted to a color. isColor should first be checked
  
  @param attribute The attribute whose value should be interpreted as a color
  @return The color based on the attribute