Here you can find the source of fromHex(final String hexValue)
public static int fromHex(final String hexValue)
//package com.java2s; //License from project: Open Source License public class Main { private static final String OPAQUE = "FF"; public static int fromHex(final String hexValue) { // hexValue is interpreted as AARRGGBB return (int) Long.parseLong(hexValue, 16); }// w w w.jav a 2s. c o m public static int fromHex(final String red, final String green, final String blue) { return fromHex(OPAQUE, red, green, blue); } public static int fromHex(final String alpha, final String red, final String green, final String blue) { return fromHex(alpha + red + green + blue); } }