The “cor” in this expression is not the same as “cor” of color. Both meaning and pronunciation (the former has an open accent on the “o” letter, and the latter hsa a closed accent).
It means to know something from memory.
- O novo atacante da seleção é o único que sabe o hino do time de cor.
Of color. Used normally to say that a person is black or has black ancestors. The letter “o” in this expression has a closed accent, as otherwise it means something different.
- O Brasil tem muita gente de cor, mas ainda há muita discriminação.