How to get a UIView color of a perticular pixel(x,y)?

I am new bie to iphone sdk. How can I get a UIView's color at a specific point(x,y).

Here is the situation:
I draw a few circles (with border color white and background is black), and there is another view(a small rectangle) which has to movie within the circles.
So, when I know the border color of the circle, I will make the small rectangle object to move back.

I have searched all the way, but no luck so far
(I am using core graphics/Quartz)
Thank you,
Sridhar

I am new bie to iphone sdk. How can I get a UIView's color at a specific point(x,y).

Here is the situation:
I draw a few circles (with border color white and background is black), and there is another view(a small rectangle) which has to movie within the circles.
So, when I know the border color of the circle, I will make the small rectangle object to move back.

I have searched all the way, but no luck so far
(I am using core graphics/Quartz)
Thank you,
Sridhar

There may be a better way, but you could try drawing into an CGBitmapContext, and then you can get direct access to the pixels.