new method for taking the color of pixel