Difference between revisions of "Command/defineprocesscolor"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \defineprocesscolor")
 
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:
 
<cd:description><!-- the long description of the command goes here -->
 
<cd:description><!-- the long description of the command goes here -->
 
</cd:description>
 
</cd:description>
<cd:examples><cd:example title="Example of getting a transparent version of an existing color">\setupbodyfont[palatino,30pt]
+
<cd:examples><cd:example title="Example of getting a transparent version of an existing color"><context source="yes">
\definecolor[myred][r=.5]
+
\setupbodyfont[palatino,20pt]
\defineprocesscolor[myredish][myred][a=1,t=.5]
+
 
Three \color[red]{cool} cats \par
+
\definecolor       [myyellow]                 [r=1,g=1.,b=0.]
Three \color[myred]{cool} cats \par
+
\defineprocesscolor [mytrspyellowA] [myyellow] [a=1,t=.5]
Three \color[myredish]{cool} cats</cd:example></cd:examples>
+
\definecolor        [mytrspyellowB]           [\colorcomponents{myyellow},a=1,t=.5]
 +
 
 +
\framed[background=color,backgroundcolor=darkblue,foregroundcolor=yellow]{yellow}
 +
 
 +
\framed[background=color,backgroundcolor=darkblue,foregroundcolor=mytrspyellowA]{Transparent yellow A}
 +
 
 +
\framed[background=color,backgroundcolor=darkblue,foregroundcolor=mytrspyellowB]{Transparent yellow B}
 +
</context></cd:example></cd:examples>
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>
 
<cd:seealso>
 
<cd:seealso>

Latest revision as of 10:19, 8 May 2024


\defineprocesscolor

Summary

The command \defineprocesscolor allows to define a color by modifying an existing color.

Settings

\defineprocesscolor[...][...][...=...,...]
[...]name
[...]color
...=...,...inherits from \definecolor

Description

Examples

Example of getting a transparent version of an existing color

\setupbodyfont[palatino,20pt]

\definecolor        [myyellow]                 [r=1,g=1.,b=0.]
\defineprocesscolor [mytrspyellowA] [myyellow] [a=1,t=.5]
\definecolor        [mytrspyellowB]            [\colorcomponents{myyellow},a=1,t=.5]

\framed[background=color,backgroundcolor=darkblue,foregroundcolor=yellow]{yellow}

\framed[background=color,backgroundcolor=darkblue,foregroundcolor=mytrspyellowA]{Transparent yellow A}

\framed[background=color,backgroundcolor=darkblue,foregroundcolor=mytrspyellowB]{Transparent yellow B}

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: