Changes

Jump to navigation Jump to search
m
Reverted edits by Garulfo (talk) to last revision by Hraban
}}
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>definecolor</syntax>
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
<tr valign="top" class="second">
<td class="cmd">[[Command/keyword:h|h]]</td>
<td>[[Command/value:number|number]] hue (HSB/HWB, 0–360)</td>
</tr>
<tr valign="top" class="second">
<tr valign="top" class="second">
<td class="cmd">[[Command/keyword:v|v]]</td>
<td>[[Command/value:number|number]] brightness/value (HSB), blackness (HWB)</td> </tr> <tr valign="top" class="second"> <td class="cmd">[[Command/keyword:w|w]]</td> <td>[[Command/value:number|number]] whiteness (HWB)</td>
</tr>
<tr valign="top" class="second">
<tr valign="top" class="second">
<td class="cmd">[[Command/keyword:x|x]]</td>
<td>[[Command/value:text|text]] Hexadecimal RGB value (like in HTML), only with hex module</td>
</tr>
</table>
<code>\color</code> command.
 ===Hex colors in MkII===To use hexadecimal colors in mkii MkII you need to load the proper module first:
<texcode>
Then the colors can be specified with
<texcode>
\definecolor[hex-red][h=FF0000]% it’s h instead of x in MkII
</texcode>
 
===Transparency===
Regarding the key {{code|a}}, which means transparency alternative method, there are a certain number of values (actually at least 13, from 0 to 12) whose meanings can be seen from below:
<texcode>
% definition in terms of involves a fraction, processed by Lua.
\definecolor[ColorA][1.0(red)]
% succeeds
</texcode>
== Example ==</texcodecontext source=yes mode=mkiv>% rgb\definecolor[bluu][r=.25, g=.1, b=1]Hey, \color[bluu]{look at that!} % hex\definecolor[salmon][x=AB5757]Hey, \color[salmon]{look at that!}
\definecolor[brightorange][c=0, m= Example .4325, y=.9286, k=.0118]<context>Hey, \color[brightorange]{orange you glad I didn't say banana?}
\definecolor[darknavy][c=.9753, m=.4444, y=0, k=.6824]
Hey, \color[darknavy]{is this dark navy?}
</context>

Navigation menu