Convert RGB to HSV in android

I want to get the ARGB values from a pixel and convert to HSV and then set the pixel with the new values. I don’t fully understand how to do that. Can anyone help me?