Note that `\MPcolor{...}` behaves similar to a `color` primitive in MetaPost. For example, the following is valid MetaPost code.
<texcode>color myColor; myColor = 0.5[\MPcolor{highlight}, white];</texcode>
For more further reading: [[Color in MetaPost]].
== Testing if color is defined ==
To test if a color is defined, use
* {{cmd|doifcolor}}
* {{cmd|doifcolorelse}}
Usage:
<texcode>
\doifcolor{color-name}{... if branch ... }
\doifcolorelse{color-name}{... if branch ...}{... else branch ...}
</texcode>
== Using colors in TikZ ==
= Viewing pre-defined color =
|}
= Testing if color is defined =
To test if a color is defined, use
* {{cmd|doifcolor}}
* {{cmd|doifcolorelse}}
Usage: <texcode>\doifcolor{color-name}{... if branch ... }\doifcolorelse{color-name}{... if branch ...}{... else branch ...}</texcode> = Specialized Further reading and specialized topics =
* [[Color/Palet|Color Palettes]]
* [[Color/Transparency|Transparency]]
* [[Color/Spot_Colors|Spot Colors]]
= * References = ** [http://paletton.com Paletton] - Website to choose color palettes** [http://colorbrewer2.org/ ColorBrewer] - website to choose colors for maps and graphics. ** Tina Sutton, Bride M Whelan: The Complete Color Harmony. Rockport Publishers (2004). ISBN 978-1592530311 (recommanded in the mailing list) {{Color navbox}}