I have a color value as #555656. I want to apply this value to java.awt.Color class.
This class accepts the value from 0 to 255...
how to convert this hex value to specified value for Color class ?
swapnel surade wrote:I have converted the hex to int and it worked for me...
Too bad.
You could have used
From the API docs
Converts a String to an integer and returns the specified opaque Color. This method handles string formats that are used to represent octal and hexidecimal numbers.