I'm using


to use RoyalPurple color, but now I wanted to redefine it to


But I get

! Package xcolor Error: Undefined color model `RoyalPurple'.

that doesn't happen with


So I think that \definecolor just works with "normal" colors... how to solve it?

  • The first argument has to be a color model, that is, html, rgb, or whatever format you'd like to provide your definition of the color in. – carsten Nov 13 '16 at 23:02
  • @carsten I suppose it, the problem I would like to solve is how to do the same with the others colors :( – UnPerrito Nov 14 '16 at 2:27

It's not working because you're giving the command an unexpected value. The second argument of \definecolor expects one of the color models from this list:

natural, rgb, cmy, cmyk, hsb, gray, RGB, HTML, HSB, Gray

That's why gray worked in your case. Try replacing that with blue and you'll get the same error. If you want a lighter version of RoyalPurple, use \colorlet.


enter image description here




Black \textcolor{lRP}{Light} \textcolor{RoyalPurple}{Regular} 
  • Thanks, but it doesn't work yet :( – UnPerrito Nov 14 '16 at 1:01
  • @UnPerrito Pasting the code above in a separate document doesn't work? You mean you get an error? – Alenanno Nov 14 '16 at 1:16
  • it works in another document, yep. – UnPerrito Nov 14 '16 at 1:41
  • 1
    @UnPerrito Ah well, as explained in my answer, that is a wrong command, it will never work as you intend it to. Use the one I have in my code example. – Alenanno Nov 14 '16 at 13:18
  • 1
    I was getting a problem with "Light-RoyalPurple" so now I changed it for lRP and now it's working haha I'm sorry! Eu fico muito obrigado com você! – UnPerrito Nov 14 '16 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.