Getting random color pixels from Texture2D

My method works. There was something wrong with the Texture I was getting.