Here you can find the source of formatColorInt2HexString(int c)
public static String formatColorInt2HexString(int c)
//package com.java2s; //License from project: Apache License public class Main { public static String formatColorInt2HexString(int c) { String s = ""; try {//from www .j a va 2s .c o m s = String.format("#%06X", (0xFFFFFF & c)); } catch (Exception e) { } return s; } }