How to convert String to color code in java code examples

 public static Color convertStringToColor(String colorString)
    {
        int k = Integer.parseInt(colorString, 16);
        int j1 = k >> 16 & 0xff;
        int i2 = k >> 8 & 0xff;
        int l2 = k & 0xff;
        return new Color(j1, i2, l2);
    }

Comments

Recent Post

Recent Posts Widget

Popular posts from this blog

Capture image from webcam java code, examples

How to capture finger prints in java

Shallow Copy Deep Copy Java example