skydoves / ColorPickerView

🎨 Android colorpicker for getting colors from any images by tapping on the desired color.
Apache License 2.0
1.58k stars 212 forks source link

Error color in colorEnvelope.getHexCode() #123

Open vallemar opened 10 months ago

vallemar commented 10 months ago

Please complete the following information:

When I create a ColorPickerDialog and add a setPositiveButton the getHexCode() method of colorEnvelope returns another code.

Example:

colorEnvelope.getColor() -> -261120
colorEnvelope.getHexCode() -> FFFC0431
Integer.toHexString(colorEnvelope.getColor()).substring(2) -> fc0431

Integer.toHexString(colorEnvelope.getColor()).substring(2) I found it here and it seems to work fine https://stackoverflow.com/a/6544482/6015400