Convert Screen point to UI rectangle coordinates

Hello everybody! I know there’s a similiar questioin here, but I have problems with it. I need to conver the Input.mousePosition into the coordinates within the UI Image for further convertation into texture pixels and using GetPixel() onto the texture of this UI Image. But the problem is converting Input.mousePosition into UI coordinates.
I try RectTransformUtility.ScreenPointToLocalPointInRectangle(myRect, Input.mousePosition, null, out tmpVec), but it ALWAYS returns true, no matter where mouse is, over the image or not, and the out Vector2 parameter has the position of the mouse relative to the center of the image(why?), and I just think it works not the way it is described in documentation.
The RectTransformUtility.RectangleContainsScreenPoint(myRect, Input.mousePosition) works as described - it REALLY returns true when mouse is over the image, and false when it is not. But it gives out no coordinates that can be converted to use the GetPixel func.
Please anyone help?

I solved this problem by myself. The problem was that the UI rect coordinates are positioned to the pivot point of the UI element, and it confused me a lot, because the pivot of myRect is in the center of the image. So I needed just to calculate the out tmpVecinto the understandable coordinates for further usage like this:

            if(tmpVec.x < 0)
            {
                coordX = colorPalette.rect.max.x + tmpVec.x;
            }
            else if(tmpVec.x >= 0)
            {
                coordX = tmpVec.x + colorPalette.rect.max.x;
            }

            
            if (tmpVec.x < 0)
            {
                coordY = colorPalette.rect.max.y + tmpVec.y;
            }
            else if (tmpVec.x >= 0)
            {
                coordY = tmpVec.y + colorPalette.rect.max.y;
            }

I did a coordinate translation tool for the UI to convert from / to: Screen Space (pixels), anchor coordiantes, rect coordinates, canvas coordinates, coordinates of objects located at different containers, etc. Take a look: http://forum.unity3d.com/threads/released-ui-rect-transform-extended.403626/