How to determine range of HSV values of the image?
You can simply specify a ROI for that region and convert it into HSV.

For eg (below is pseudo-code in Python-OpenCV)

# define ROI of RGB image 'img'
roi = img[r1:r2, c1:c2]

# convert it into HSV
hsv = cv2.cvtColor(roi,cv2.COLOR_BGR2HSV)


Now it gives you the hsv values of the region.

But one or two difficulties there:


Your object may comprise some part of the ROI. There may be some background region also inside your ROI. ie if your object is red and background is blue, your ROI will contain two different values, one for RED and other for BLUE. Which one will your program select?
But colors won't be constant like RED or BLUE. You get wide variety of colours. Below is a plot of different colours for a ROI with green object.




But it has values from yellow to slight blue with green as major. 

So you will have to select color with maximum probability, may be from checking its histogram. 

Check this SOF for more details : https://stackoverflow.com/questions/13111504/selecting-best-range-of-values-from-histogram-curve