You look dead ahead and use your periphery to judge what colour light is showing. It's very difficult. I believe it called a peripheral vison test, and this is what that means.
I wondered about this, as I have done the test but couldn't see anything at first. Then I crouched a little and could make out some lights, but I couldn't see the colours well. The lady let me pass, but I was completely baffled by what the test would be for.
It occurred to me afterwards that I could have moved my eyes rather than relying on my peripheral vision, which actually makes a lot more sense. I suspect it's one of these things where they aren't sure what to name it, so name it incorrectly.
Since there is no way of them knowing if you moved your eyes and I don't really think people can judge colours accurately using their peripheral vison, I don't think that is the purpose.