I am using MiKTeX with the help of beamer to make slides. However, there was an error when running the LaTeX file, that is:

! Package xcolor Error: Undefined color `n'

See the xcolor package documentation for explanation.

Type H <return> for immediate help.


How to correct this error?

  • 2
    Welcome to TeX.SX! Could you please add a minimal working example (MWE) that allows others to reproduce the error message you get?
    – leandriis
    Commented Dec 30, 2019 at 10:11
  • 2
    The problem is exactly what it says. You are using a color n somewhere and it’s not yet defined. Probably you misspelt the color name.
    – fractal
    Commented Dec 30, 2019 at 10:14
  • Normally the exact location of the error is also given (with a line number), directly below the lines that you copied in the question. If the error is in your main document then just changing this line will solve the error. Note however that some editors do not show this information or show it in a different way.
    – Marijn
    Commented Dec 30, 2019 at 13:43


You must log in to answer this question.

Browse other questions tagged .