Difference between revisions of "Command/color"
< Command
Jump to navigation
Jump to search
(Created page with "Documentation for \color") |
|||
(One intermediate revision by the same user not shown) | |||
Line 18: | Line 18: | ||
</cd:description> | </cd:description> | ||
<cd:examples><cd:example title=""><context source="yes"> | <cd:examples><cd:example title=""><context source="yes"> | ||
− | This text is \color[ | + | This text is \color[green]{green}. |
</context> | </context> | ||
</cd:example></cd:examples> | </cd:example></cd:examples> | ||
<cd:notes> | <cd:notes> | ||
<cd:note author="Taco" date="2021-11-09T13:37:50+0100"> | <cd:note author="Taco" date="2021-11-09T13:37:50+0100"> | ||
− | In MkII, if there was no | + | |
+ | |||
+ | In MkII, if there was no &squo;text&squo; argument given (the character following the &squo;]&squo; is not an &squo;{&squo;), then the command behaved like a plain TeX font switch: it applied from here to the end of the current grouping level. This is no longer the case. | ||
+ | |||
+ | |||
</cd:note></cd:notes> | </cd:note></cd:notes> | ||
Line 31: | Line 35: | ||
<cd:commandref name="definecolor"></cd:commandref> | <cd:commandref name="definecolor"></cd:commandref> | ||
<cd:wikipage page="Color"></cd:wikipage> | <cd:wikipage page="Color"></cd:wikipage> | ||
− | <cd:commandref name="usecolors"></cd:commandref></cd:seealso> | + | <cd:commandref name="usecolors"></cd:commandref> |
+ | <cd:commandref name="showcolor"></cd:commandref></cd:seealso> | ||
</cd:commandgroup> | </cd:commandgroup> |
Latest revision as of 09:10, 12 April 2023
Contents
\color
Summary
The command \color is used to typeset text with a color.
Settings
Description
Typesets the {content} in [color].
Some color names are preloaded (like the six primary and secondary colors, as well as black and white). For other colors, you can define your own color using \definecolor, or load one of the color definition files using \usecolors.
Examples
Example 1
This text is \color[green]{green}.
Notes
- By Taco on 2021-11-09T13:37:50+0100:
In MkII, if there was no 'text' argument given (the character following the ']' is not an '{'), then the command behaved like a plain TeX font switch: it applied from here to the end of the current grouping level. This is no longer the case.