Fixed algo to pick the right pixel to color.