Difference between revisions of "Command/definespotcolor"
< Command
Jump to navigation
Jump to search
(Create skeleton. Description still needed.) |
m (Reverted edits by Garulfo (talk) to last revision by Usonianhorizon) Tag: Rollback |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 4: | Line 4: | ||
}} | }} | ||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>definespotcolor</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
<table cellspacing="4" cellpadding="2" class="cmd"> | <table cellspacing="4" cellpadding="2" class="cmd"> | ||
Line 29: | Line 31: | ||
== Description == | == Description == | ||
− | == Example == | + | Spot colours can be defined using three arguments instead of two arguments, like {{cmd|definecolor}}. The first argument is the colour to define. The second argument is the colour to be use as a base. And the third argument takes the same options as \definecolor. |
+ | |||
+ | == Example 1 == | ||
<context source=yes mode=mkiv> | <context source=yes mode=mkiv> | ||
\setuppapersize[A5] | \setuppapersize[A5] | ||
Line 45: | Line 49: | ||
\starteffect[outline] | \starteffect[outline] | ||
− | + | Magic Outline | |
\stopeffect | \stopeffect | ||
\stopcolor | \stopcolor | ||
\stoptext | \stoptext | ||
+ | </context> | ||
+ | |||
+ | == Example 2 == | ||
+ | |||
+ | <context source=yes mode=mkiv> | ||
+ | \definecolor [ColourSecondary] [h=9A957A] | ||
+ | \definecolor [ColourSecondaryLighter] [h=9A957A, a=1, t=.5] | ||
+ | \definecolor [ColourSecondaryLightest] [h=9A957A, a=1, t=.3] | ||
+ | \definespotcolor [ColourSecondaryLighterSpot] [ColourSecondary] [a=1, t=.5] | ||
+ | \definespotcolor [ColourSecondaryLightestSpot] [ColourSecondary] [a=1, t=.3] | ||
+ | |||
+ | \setupblackrules [height=1cm, width=5cm] | ||
+ | |||
+ | \starttext | ||
+ | |||
+ | \blackrule[color=ColourSecondary] | ||
+ | |||
+ | %% defined using \definecolor | ||
+ | \dontleavehmode | ||
+ | \blackrule[color=ColourSecondaryLighter] | ||
+ | \blackrule[color=ColourSecondaryLightest] | ||
+ | |||
+ | %% defined using \definespotcolor | ||
+ | \dontleavehmode | ||
+ | \blackrule[color=ColourSecondaryLighterSpot] | ||
+ | \blackrule[color=ColourSecondaryLightestSpot] | ||
+ | |||
+ | \stoptext | ||
</context> | </context> | ||
Line 61: | Line 93: | ||
{{Forum|{{SUBPAGENAME}}}} | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | [[Category:Command/Colors|definespotcolor]] |
Latest revision as of 13:45, 8 June 2020
\definespotcolor
Syntax (autogenerated)
\definespotcolor[...][...][...=...,...] | |
[...] | name |
[...] | color |
a | number none normal multiply screen overlay softlight hardlight colordodge colorburn darken lighten difference exclusion hue saturation color luminosity |
t | number |
e | text |
p | number |
Syntax
\definespotcolor[...][...][...] | |
[...] | text |
[...] | text |
[...] | text |
Description
Spot colours can be defined using three arguments instead of two arguments, like \definecolor. The first argument is the colour to define. The second argument is the colour to be use as a base. And the third argument takes the same options as \definecolor.
Example 1
\setuppapersize[A5] % define the spot color for the plotter \definecolor[CutContour][c=0,m=1,y=0,k=0] \definespotcolor[Contour][CutContour][p=1] % here is the outline feature \defineeffect[outline][alternative=outer,rulethickness=.25pt] \starttext \startcolor[Contour] \definedfont[Serif at 50pt] \starteffect[outline] Magic Outline \stopeffect \stopcolor \stoptext
Example 2
\definecolor [ColourSecondary] [h=9A957A] \definecolor [ColourSecondaryLighter] [h=9A957A, a=1, t=.5] \definecolor [ColourSecondaryLightest] [h=9A957A, a=1, t=.3] \definespotcolor [ColourSecondaryLighterSpot] [ColourSecondary] [a=1, t=.5] \definespotcolor [ColourSecondaryLightestSpot] [ColourSecondary] [a=1, t=.3] \setupblackrules [height=1cm, width=5cm] \starttext \blackrule[color=ColourSecondary] %% defined using \definecolor \dontleavehmode \blackrule[color=ColourSecondaryLighter] \blackrule[color=ColourSecondaryLightest] %% defined using \definespotcolor \dontleavehmode \blackrule[color=ColourSecondaryLighterSpot] \blackrule[color=ColourSecondaryLightestSpot] \stoptext
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: