Color to Hex Lowercase - Java 2D Graphics

Java examples for 2D Graphics:Color HEX

Description

Color to Hex Lowercase

Demo Code


//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()));
    }
}

Related Tutorials