Changes

Jump to navigation Jump to search
1,717 bytes added ,  12:39, 9 November 2021
Created page with "Documentation for \color"
<cd:commandgroup name="color" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\color</tt> is used to typeset text with a color.
</cd:shortdesc>
<cd:variants>
<cd:command category="colors" file="colo-ini.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-color.xml" level="document" name="color" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:color"></cd:constant>
</cd:keywords>
<cd:content ordinal="2"></cd:content>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>Typesets the {content} in <tt>[color]</tt>.

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 {{cmd|definecolor}}, or load one of the color definition files using {{cmd|usecolors}}.
</cd:description>
<cd:examples><cd:example title=""><context source="yes">
This text is \color[blue]{blue}.
</context>
</cd:example></cd:examples>
<cd:notes>
<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.

</cd:note></cd:notes>
<cd:seealso>
<cd:source file="colo-ini.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Colors"></cd:wikipage>
<cd:commandref name="definecolor"></cd:commandref>
<cd:wikipage page="Color"></cd:wikipage>
<cd:commandref name="usecolors"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu