Okay, I have it. He looks at the shiny, polished boots of the despot from the corner of his eye so he can see his reflection...
Or, he asks the despot if he's colourblind or something, because he needs to ask. Then when the despot says he's not, the prisoner dares him to prove it by telling him the colour of his hat.