You can use the following to convert an int value to a hex value:
String hex = Integer.toHexString(...);
You can do that for each individual value.
Or, if you just want one hex value for the entire Color then you will need to get the int value of the Color
object by using the getRGB(...)
method. The hex value will include the alpha value in this case so you may want to ignore the first 2 characters.