private static int shiftColorSpaceToSwing(final Color newCol){
  final int r=(int)(newCol.getRed() * 255);
  final int g=(int)(newCol.getGreen() * 255);
  final int b=(int)(newCol.getBlue() * 255);
  return (r << 16) + (g << 8) + b;
}

private static int shiftColorSpaceToSwing ( final Color newCol ) { final int r = ( int ) ( newCol . getRed ( ) * 255 ) ; final int g = ( int ) ( newCol . getGreen ( ) * 255 ) ; final int b = ( int ) ( newCol . getBlue ( ) * 255 ) ; return ( r << 16 ) + ( g << 8 ) + b ; }
performs a conversion from 0 - 1 to 0 - 255 so we can perform a bitshift to save the rgb values .
