public static int parseRGB(FXGNode node,String value,String name){
  Matcher m;
  m=rgbPattern.matcher(value);
  if (!m.matches()) {
    throw new FXGException(node.getStartLine(),node.getStartColumn(),"InvalidColorValue",name,value);
  }
  value=value.substring(1);
  int a=255;
  int r=Integer.parseInt(value.substring(0,2),16) & 0xFF;
  int g=Integer.parseInt(value.substring(2,4),16) & 0xFF;
  int b=Integer.parseInt(value.substring(4,6),16) & 0xFF;
  return (a << 24) | (r << 16) | (g << 8)| b;
}

public static int parseRGB ( FXGNode node , String value , String name ) { Matcher m ; m = rgbPattern . matcher ( value ) ; if ( ! m . matches ( ) ) { throw new FXGException ( node . getStartLine ( ) , node . getStartColumn ( ) , "InvalidColorValue" , name , value ) ; } value = value . substring ( 1 ) ; int a = 255 ; int r = Integer . parseInt ( value . substring ( 0 , 2 ) , 16 ) & 0xFF ; int g = Integer . parseInt ( value . substring ( 2 , 4 ) , 16 ) & 0xFF ; int b = Integer . parseInt ( value . substring ( 4 , 6 ) , 16 ) & 0xFF ; return ( a << 24 ) | ( r << 16 ) | ( g << 8 ) | b ; }
convert an fxg hexadecimal color string to an int . the format must be a ' # ' character followed by six hexadecimal characters , i . e . ' # rrggbb ' .
