Difference between revisions of "Command/color"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \color")
 
Line 23: Line 23:
 
<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 '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.
+
 
 +
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 33:
 
<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>

Revision as of 12:41, 9 November 2021


\color

Summary

The command \color is used to typeset text with a color.

Settings

\color[...]{...}
[...]color
{...}content

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[blue]{blue}.

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.

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: