41

I know how to define a color using \definecolor with literals to describe the color. How can I define a color using an already defined color? In other words: How can I make a color accessible under multiple names?

46

This can be simply done using \colorlet{mycolor}{someothercolor} from the xcolor package. Here someothercolor can be any other color name or a color mix like
colora!<number>!colorb.

You should note that this copies the current color definition. If someothercolor is changed afterwards (e.g. using another \colorlet) mycolor will not change.

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.