Difference between revisions of "Command/definecolor"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
m (cleaned up)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=definecolor
 
|name=definecolor
Line 71: Line 69:
  
 
== Description ==  
 
== Description ==  
<pre>
+
<code>\definecolor</code> associates a name with a color, for later use with the
\definecolor associated a name with a color, for later use with the
+
<code>\color</code> command.
\color command.
 
</pre>
 
  
 
To use hexadecimal colors you need to load the proper module first:
 
To use hexadecimal colors you need to load the proper module first:
  
<pre>
+
<texcode>
 
\setupcolor[hex]
 
\setupcolor[hex]
</pre>
+
</texcode>
  
 
Then the colors can be specified with
 
Then the colors can be specified with
<pre>
+
<texcode>
 
\definecolor[hex-red][h=FF0000]
 
\definecolor[hex-red][h=FF0000]
</pre>
+
</texcode>
  
  

Revision as of 16:40, 11 April 2010

\definecolor

Syntax

\definecolor[...][...,...=...,...]
[...] name
r text
g text
b text
c text
m text
y text
k text
s text
h text
t text
a text
p text
e text


Description

\definecolor associates a name with a color, for later use with the \color command.

To use hexadecimal colors you need to load the proper module first:

\setupcolor[hex]

Then the colors can be specified with

\definecolor[hex-red][h=FF0000]


Example

See also