Java examples for 2D Graphics:Color HEX
color To Hex
//package com.java2s; import java.awt.Color; public class Main { public static String colorToHex(Color color) { return String.format("#%02X%02X%02X%02X", color.getAlpha(), color.getRed(), color.getGreen(), color.getBlue()); }//w w w .jav a 2 s . co m }