I have the integer pixel i got from get HVG(hue,sat,val), but i dont have any clue about how to convert it to RGB. For example, HVG(hue,sat,val) to Color(0,200,0). Any tips?
android.graphics.Color.HSVToColor()
will convert hue saturation and value into the packed RGB format used internally by the Color
class.
Given an int
in this format you can extract values for red, green, blue and alpha using methods of the Color
class.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.