How does it determine the color?