adding getColor and refactoring pixels