Difference between revisions of "Command/definepalet"
< Command
Jump to navigation
Jump to search
(→Description: inserted note concerning syntax oddities) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
}} | }} | ||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>definepalet</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
<table cellspacing="4" cellpadding="2" class="cmd"> | <table cellspacing="4" cellpadding="2" class="cmd"> | ||
Line 18: | Line 20: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
== Description == | == Description == | ||
− | |||
− | + | Define a set of color name definitions that can then all be activated at once with {{cmd|setuppalet}}. To inspect the palet, or to compare its colours against each other, use {{cmd|showpalet}} and {{cmd|comparepalet}}. | |
− | {{cmd| | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | {{cmd|definepalet}} used to rely on a non-standard argument parser that would | |
− | + | not tolerate trailing commas [http://www.ntg.nl/pipermail/ntg-context/2012/067602.html]. This is no longer the case, but sufficiently old installation might still exhibit the problem. | |
− | |||
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == | ||
− | < | + | <context source=yes> |
\setupcolors [x11] | \setupcolors [x11] | ||
− | \definepalet [colorful] [ | + | \definepalet [colorful] [alert=green] |
− | \definepalet [bleak] [ | + | \definepalet [bleak] [alert=darkgray] |
\starttext | \starttext | ||
\setuppalet [colorful] | \setuppalet [colorful] | ||
− | \color[ | + | \color[alert]{Ain't I a colorful entity?} |
\setuppalet [bleak] | \setuppalet [bleak] | ||
− | \color[ | + | \color[alert]{Ain't I a colorful entity?} |
\stoptext | \stoptext | ||
− | </ | + | </context> |
== See also == | == See also == | ||
− | + | ||
+ | {{Color navbox}} | ||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == |
Revision as of 13:35, 13 October 2019
\definepalet
Syntax (autogenerated)
\definepalet[...][...=...,...] | |
[...] | name |
name | color |
\definepalet[...][...] | |
[...] | name |
[...] | name |
Syntax
\definepalet[...][...,...=...,...] | |
[...] | name |
name | name |
Description
Define a set of color name definitions that can then all be activated at once with \setuppalet. To inspect the palet, or to compare its colours against each other, use \showpalet and \comparepalet.
\definepalet used to rely on a non-standard argument parser that would not tolerate trailing commas [1]. This is no longer the case, but sufficiently old installation might still exhibit the problem.
Example
\setupcolors [x11] \definepalet [colorful] [alert=green] \definepalet [bleak] [alert=darkgray] \starttext \setuppalet [colorful] \color[alert]{Ain't I a colorful entity?} \setuppalet [bleak] \color[alert]{Ain't I a colorful entity?} \stoptext
See also
|
Help from ConTeXt-Mailinglist/Forum
All issues with: