public static String convertHexColorString(int color){
  return String.format("#%06X",(0xFFFFFF & color));
}

public static String convertHexColorString ( int color ) { return String . format ( "#%06X" , ( 0xFFFFFF & color ) ) ; }
tool to convert an hexadecimal color to its string representation
