The structure of a character and the evolution of patterns