Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to define some colors and then define some aliases to them. For instance, if I define the following color:

\definecolor{MyColorA}{rgb}{0.1,0.2,0.3}

and then want to define an alias "NoteColor" to be the same as "MyColorA", what is the command? I tried:

\definecolor{NoteColor}{named}{MyColorA}

but this did not work. Any suggestions or links welcome. Thanks.

share|improve this question
2  
Are you sure the second command didn't work? It should have. It's an alternate syntax to the \colorlet solutions given in the answers: \definecolor{Alias}{named}{ExistingColour} = \colorlet{Alias}{ExistingColour}. –  Alan Munn Oct 25 '11 at 14:08
    
I tried \definecolor{Alias}{named}{ExistingColour} but it still did not work. However, the xcolor solution below works. –  kmccoy Oct 25 '11 at 15:28
    
@kmmcoy Both commands are from xcolor so they should both with. –  Alan Munn Oct 25 '11 at 16:00

2 Answers 2

up vote 19 down vote accepted

If you load xcolor, which accepts the same commands of color and many more, you can say

\colorlet{Notecolor}{MyColorA}
share|improve this answer
2  
Perfect! I changed to use the xcolor package and used \colorlet{Alias}{ExistingColour} which works nicely. Thanks. –  kmccoy Oct 25 '11 at 15:29

With xcolor you can use \colorlet.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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