Java examples for 2D Graphics:Color HEX
Color to Hex Lowercase
//package com.java2s; import java.awt.Color; public class Main { public static String toHexLowercase(Color color) { return toHex(color).toLowerCase(); }//from www . ja v a2s.co m public static String toHex(Color color) { return String.format("#%06X", (0xFFFFFF & color.getRGB())); } }