1%%
2%% This is file `xcolor3.tex',
3%% generated with the docstrip utility.
4%%
5%% The original source files were:
6%%
7%% xcolor.dtx  (with options: `test3')
8%%
9%% IMPORTANT NOTICE:
10%%
11%% For the copyright see the source file.
12%%
13%% Any modified versions of this file must be renamed
14%% with new filenames distinct from xcolor3.tex.
15%%
16%% For distribution of the original source see the terms
17%% for copying and modification in the file xcolor.dtx.
18%%
19%% This generated file may be distributed as long as the
20%% original source files, as listed above, are part of the
21%% same distribution. (The sources need not necessarily be
22%% in the same archive or directory.)
23%%
24\ProvidesFile{xcolor3}
25 [2005/12/21 v2.09 Color logging test (UK)]
26%%
27%% ----------------------------------------------------------------
28%% Copyright (C) 2003-2005 by Dr. Uwe Kern <xcolor at ukern dot de>
29%% ----------------------------------------------------------------
30%%
31\def\XCfileversion{v2.09}%
32\def\XCfiledate{2005/12/21}%
33\listfiles
34\documentclass[a4paper]{article}
35\usepackage[showerrors,table,dvipsnames*,hyperref]{xcolor}[2005/12/21]
36\usepackage[margin=2.25cm]{geometry}
37\usepackage
38 [\GinDriver,hyperindex=false,bookmarks,bookmarksopen,bookmarksopenlevel=1,%
39  pdftitle={xcolor3 \XCfileversion{} (\XCfiledate)},pdfauthor={Dr. Uwe Kern},%
40  pdfsubject={Color extensions for LaTeX and pdfLaTeX},%
41  pdfkeywords={xcolor,color,colour,model,tint,tone,shade,harmony,spot,latex,pdftex,dvips,%
42   conversion,blend,mix,mask,separation,rgb,cmy,cmyk,hsb,gray,html,wave,thsb,wheel}]{hyperref}
43
44\tracingcolors=4
45%%\tracingcolors=3
46%%\tracingcolors=2
47%%\tracingcolors=1
48%%\tracingcolors=0
49
50\parindent0pt
51\pagecolor{gray!25}
52
53\definecolors{JungleGreen,DarkOrchid}
54
55\begin{document}
56\title{Color extensions with the \textsf{xcolor} package --- various examples}
57\author{\href{mailto:xcolor@ukern.de}{\fboxrule0pt\fboxsep2pt\fbox{Dr. Uwe Kern}}}
58\date{\XCfileversion{} (\XCfiledate)
59\thanks{This file (\texttt{\jobname.tex}) is part of the \textsf{xcolor} distribution which can be downloaded from the CTAN mirrors \texttt{\href{http://www.ctan.org/tex-archive/macros/latex/contrib/xcolor/}{CTAN/macros/latex/contrib/xcolor/}} or the homepage \texttt{\href{http://www.ukern.de/tex/xcolor.html}{www.ukern.de/tex/xcolor.html}}. Please send error reports and suggestions for improvements to \texttt{\href{mailto:xcolor@ukern.de}{xcolor@ukern.de}}.}}
60\maketitle
61
62The purpose of this file is to demonstrate a variety of capabilities including the logging facilities of the \textsf{xcolor} package.
63By playing around with different values of \texttt{\string\tracingcolors}, one can observe the different behavior in the \texttt{log} file.
64
65\section{Predefined colors}
66
67\begingroup
68\small\sffamily
69\rowcolors1{}{}
70\begin{testcolors}[rgb,cmyk,hsb,HTML,gray]
71\testcolor{red}
72\testcolor{green}
73\testcolor{blue}
74\testcolor{cyan}
75\testcolor{magenta}
76\testcolor{yellow}
77\testcolor{orange}
78\testcolor{violet}
79\testcolor{purple}
80\testcolor{brown}
81\testcolor{pink}
82\testcolor{olive}
83\testcolor{black}
84\testcolor{darkgray}
85\testcolor{gray}
86\testcolor{lightgray}
87\testcolor{white}
88\noalign{\medskip}\hline\noalign{\medskip}
89\testcolor{-red}
90\testcolor{-green}
91\testcolor{-blue}
92\testcolor{-cyan}
93\testcolor{-magenta}
94\testcolor{-yellow}
95\testcolor{-orange}
96\testcolor{-violet}
97\testcolor{-purple}
98\testcolor{-brown}
99\testcolor{-pink}
100\testcolor{-olive}
101\testcolor{-black}
102\testcolor{-darkgray}
103\testcolor{-gray}
104\testcolor{-lightgray}
105\testcolor{-white}
106\noalign{\medskip}\hline\noalign{\medskip}
107\testcolor{JungleGreen}
108\testcolor{DarkOrchid}
109\noalign{\medskip}\hline\noalign{\medskip}
110\testcolor{-JungleGreen}
111\testcolor{-DarkOrchid}
112\end{testcolors}
113\endgroup
114
115\vfill
116
117\clearpage
118\pagecolor{white}
119
120\section{Color definition and application}
121
122\providecolor{dummy}{rgb}{.6,.5,.4}
123\definecolor{dummy}{rgb}{.6,.5,.4}
124\providecolor{dummy}{rgb}{.6,.5,.4}
125\hbox{\textcolor{dummy}{Test with \texttt{\string\definecolor}}}
126
127\bigskip
128
129Comma-separated and space-separated definitions:
130
131\definecolor{c1}{rgb}{.7,.6,.5}
132\definecolor{c2}{rgb}{.7 .6 .5}
133\colorlet{c1a}{c1}
134\colorlet{c2a}{c2}
135
136\textcolor{c1}{identical} =
137\textcolor{c2}{identical} =
138\textcolor{c1a}{identical} =
139\textcolor{c2a}{identical} =
140\textcolor[rgb]{.7,.6,.5}{identical} =
141\textcolor[rgb]{.7 .6 .5}{identical} =
142\textcolor{rgb,10:red,7;green,6;blue,5}{identical}
143\textcolor{rgb,15:red,10.5;green,9;blue,7.5}{identical}
144
145\medskip
146
147\begingroup
148\sffamily
149\begin{testcolors}
150\testcolor{c1}
151\testcolor{c2}
152\testcolor{c1a}
153\testcolor{c2a}
154\testcolor[rgb]{.7,.6,.5}
155\testcolor[rgb]{.7 .6 .5}
156\testcolor{rgb,10:red,7;green,6;blue,5}
157\testcolor{rgb,15:red,10.5;green,9;blue,7.5}
158\end{testcolors}
159\endgroup
160
161\bigskip
162
163\textcolor{rgb:red!50,4;green!25,2}{Another extended color expression (rgb:red!50,4;green!25,2)}.
164
165\bigskip
166
167\begingroup
168\color{black}
169Test with named colors:\par
170\color{blue}
171Test: \textcolor[named]{JungleGreen}{JungleGreen};
172Test: \textcolor{JungleGreen}{JungleGreen};
173Test: \textcolor{JungleGreen!50!DarkOrchid}{JungleGreen!50!DarkOrchid};
174Test: \textcolor{green!50!red}{green!50!red}.
175\endgroup
176
177\bigskip
178
179{\color[rgb]{.4,.5,.6}Test with \texttt{\string\color}}
180
181\bigskip
182Current color application:\par
183\def\test{current, \textcolor{.!50}{50\%}, \textcolor{-.}{complement},
184          \textcolor{yellow!50!.}{mix}}
185\textcolor{blue}{\test} and \textcolor{red}{\test},\par
186\def\Test{\color{.!80}Test}
187\textcolor{blue}{\Test\Test\Test\Test\Test} and
188\textcolor{red}{\Test\Test\Test\Test\Test}.
189
190\bigskip
191Current color test with \texttt{\string\definecolorseries}:\par
192\begingroup
193\color{blue}
194\definecolorseries{foo}{rgb}{last}{.}{-.}
195\resetcolorseries[5]{foo}
196\def\test{\hbox to 1em{{\color{foo!!+}\vrule width 1em height 1.5ex}}}
197Test\test\test\test\test\test\test Test
198
199\resetcolorseries[5]{foo}
200\def\test{\hbox to 1em{{\color{foo!!++}\vrule width 1em height 1.5ex}}}
201Test\test\test\test\test\test\test Test
202
203\resetcolorseries[5]{foo}
204\def\test{\hbox to 1em{{\color{foo!![2]}\vrule width 1em height 1.5ex}}}
205Test\test\test\test\test\test\test Test
206
207\endgroup
208
209\section{Color in tables}
210
211\rowcolors[\hline]{1}{green!25}{yellow!50}
212\begin{tabular}{ll}
213test & row \number\rownum\\
214test & row \number\rownum\\
215\rowcolor{blue!25}
216test & row \number\rownum\\
217test & row \number\rownum\\
218\hiderowcolors
219test & row \number\rownum\\
220test & row \number\rownum\\
221\showrowcolors
222test & row \number\rownum\\
223test & row \number\rownum\\
224\multicolumn{1}%
225 {>{\columncolor{red!12}}l}{test} & row \number\rownum\\
226\end{tabular}
227
228\section{Color information}
229
230Type test:
231\makeatletter
232\@namedef{\string\color@foo1}{foo1{}{}{}{}}\edef\tempa{\XC@type{foo1}}\tempa
233\@namedef{\string\color@foo2}{\xcolor@{foo2}{}{}{}}\edef\tempb{\XC@type{foo2}}\tempb
234\@namedef{\string\color@foo3}{\xcolor@{}{foo3}{}{}}\edef\tempc{\XC@type{foo3}}\tempc
235\@namedef{\string\color@foo4}{\xcolor@{}{}{foo4}{}}\edef\tempd{\XC@type{foo4}}\tempd
236\makeatother
237
238\end{document}
239\endinput
240%%
241%% End of file `xcolor3.tex'.
242