| 1 |
% This is COLORDVI.TEX and COLORDVI.STY in text format, as of |
| 2 |
% March 5, 1992, written by Jim Hafner, HAFNER@ALMADEN, or |
| 3 |
% [email protected]. Modified by Tomas Rokicki to be a |
| 4 |
% bit smaller and easier to add to. |
| 5 |
% |
| 6 |
% 20 Aug. 1992: Revised by J. Hafner, by adding \globalColor. |
| 7 |
% |
| 8 |
% This style file can be used to get color in TeX, LaTeX or more |
| 9 |
% importantly, FoilTeX as an optional style file. It is generic in |
| 10 |
% that the color parameters are determined by the driver's header files. |
| 11 |
% |
| 12 |
% It can be used with any driver which knows how to process the keywords |
| 13 |
% in the \special commands. Currently, only versions of dvips greater |
| 14 |
% than 5.478 (dvips is the DVI->PostScript driver by Tom Rokicki) and |
| 15 |
% TeXview on the NeXT interpret these specials. |
| 16 |
% |
| 17 |
% This file can be used in any flavor of LaTeX (e.g. LaTeX, FoilTeX, |
| 18 |
% AMS-LaTeX) by adding the keyword "colordvi" to the options in the |
| 19 |
% \documentstyle command (e.g., "\documentstyle[colordvi]{foils}") or \input |
| 20 |
% in any flavor of TeX (e.g. Plain TeX, eplain, AMS-TeX or any of the |
| 21 |
% above LaTeX flavors) with the command "\input colordvi". |
| 22 |
% |
| 23 |
% The actual parameters for each color are determined by the device |
| 24 |
% driver. |
| 25 |
% For "dvips", that is the header file color.pro prepended to the |
| 26 |
% output file by dvips. They can be overrriden by a user-supplied |
| 27 |
% header, called by either the -h option or the "h" flag in a printer |
| 28 |
% configuration file, or in the .dvipsrc (or its analogue on other |
| 29 |
% systems). |
| 30 |
% |
| 31 |
% Most of the color names and their matches were based on the |
| 32 |
% most recent (at time of writing) Crayola Crayon box of 64 colors. |
| 33 |
% |
| 34 |
% There are 68 predefined colors. At the end of this file is a |
| 35 |
% listing of the color names and their approximate PANTONE color |
| 36 |
% match. This is for reference purposes only. |
| 37 |
% |
| 38 |
% The first macro lets the user specify the background color for the |
| 39 |
% document. It sets the background color for the current page and all |
| 40 |
% succeeding pages, unless changed by another command of this type. To |
| 41 |
% change the background color back to the default, issue |
| 42 |
% \background{White} |
| 43 |
% |
| 44 |
\def\background#1{\special{background #1}} |
| 45 |
% |
| 46 |
% There are two types of text color commands. The first is in the form |
| 47 |
% \ColorName (note the uppercase for the color name). |
| 48 |
% |
| 49 |
% It is called a local color command since it takes one argument |
| 50 |
% enclosed in brackets. It writes the contents of its argument in the |
| 51 |
% selected color. This should be used for local or nested color |
| 52 |
% changes, since it restores the original color state when it completes. |
| 53 |
% The second type of color command is in the form |
| 54 |
% \textColorName |
| 55 |
% This uses the same naming convention as before. It is called a global |
| 56 |
% color command since it takes no arguments and simply sets the color at |
| 57 |
% this point. No previous color information is saved. IF YOU USE THIS |
| 58 |
% INTERNAL TO ANY LOCAL COLOR COMMAND, THE NESTING HISTORY IS LOST. |
| 59 |
% |
| 60 |
% This next definition is used in an invocation of a \textColorName |
| 61 |
% macro to save the global color value in local form via the \globalColor |
| 62 |
% macro. This new macro can then be used to protect certain regions of |
| 63 |
% the text, like item tags and headers and footers which can be |
| 64 |
% corrupted by local colors. In particular, item tags in lists can |
| 65 |
% incorrectly inherit the color from a local color command immediately |
| 66 |
% following it. The \subdef macro is invoked within the invocation of a |
| 67 |
% global color change. |
| 68 |
% |
| 69 |
\def\subdef#1{\gdef\globalColor##1{\special |
| 70 |
{color push #1}##1\special{color pop}}} |
| 71 |
% |
| 72 |
% Here are the global color changers, with color codes defined; |
| 73 |
% these are used to define the small region colors. |
| 74 |
% |
| 75 |
% This first is for user defined color. The argument #1 is for a "CMYK" |
| 76 |
% quadruple of intensity values between 0 and 1. (CMYK stands for Cyan, |
| 77 |
% Magenta, Yellow and Black.) E.g., \textColor{.2 .3 .4 .1} |
| 78 |
% |
| 79 |
\def\textColor#1{\subdef{cmyk #1}\special{color cmyk #1}} |
| 80 |
% |
| 81 |
% and a userdefinable local color command. |
| 82 |
\def\Color#1#2{\special{color push cmyk #1}#2\special{color pop}} |
| 83 |
% |
| 84 |
% |
| 85 |
\def\newColor #1 {\expandafter\def\csname #1\endcsname##1{\special |
| 86 |
{color push #1}##1\special{color pop}}% |
| 87 |
\expandafter\def\csname text#1\endcsname{\subdef{#1}% |
| 88 |
\special{color #1}}}% |
| 89 |
% |
| 90 |
% Here are the color names and their PANTONE match (approximately) |
| 91 |
% |
| 92 |
\newColor GreenYellow % GreenYellow Approximate PANTONE 388 |
| 93 |
\newColor Yellow % Yellow Approximate PANTONE YELLOW |
| 94 |
\newColor Goldenrod % Goldenrod Approximate PANTONE 109 |
| 95 |
\newColor Dandelion % Dandelion Approximate PANTONE 123 |
| 96 |
\newColor Apricot % Apricot Approximate PANTONE 1565 |
| 97 |
\newColor Peach % Peach Approximate PANTONE 164 |
| 98 |
\newColor Melon % Melon Approximate PANTONE 177 |
| 99 |
\newColor YellowOrange % YellowOrange Approximate PANTONE 130 |
| 100 |
\newColor Orange % Orange Approximate PANTONE ORANGE-021 |
| 101 |
\newColor BurntOrange % BurntOrange Approximate PANTONE 388 |
| 102 |
\newColor Bittersweet % Bittersweet Approximate PANTONE 167 |
| 103 |
\newColor RedOrange % RedOrange Approximate PANTONE 179 |
| 104 |
\newColor Mahogany % Mahogany Approximate PANTONE 484 |
| 105 |
\newColor Maroon % Maroon Approximate PANTONE 201 |
| 106 |
\newColor BrickRed % BrickRed Approximate PANTONE 1805 |
| 107 |
\newColor Red % Red VERY-Approx PANTONE RED |
| 108 |
\newColor OrangeRed % OrangeRed No PANTONE match |
| 109 |
\newColor RubineRed % RubineRed Approximate PANTONE RUBINE-RED |
| 110 |
\newColor WildStrawberry % WildStrawberry Approximate PANTONE 206 |
| 111 |
\newColor Salmon % Salmon Approximate PANTONE 183 |
| 112 |
\newColor CarnationPink % CarnationPink Approximate PANTONE 218 |
| 113 |
\newColor Magenta % Magenta Approximate PANTONE PROCESS-MAGENTA |
| 114 |
\newColor VioletRed % VioletRed Approximate PANTONE 219 |
| 115 |
\newColor Rhodamine % Rhodamine Approximate PANTONE RHODAMINE-RED |
| 116 |
\newColor Mulberry % Mulberry Approximate PANTONE 241 |
| 117 |
\newColor RedViolet % RedViolet Approximate PANTONE 234 |
| 118 |
\newColor Fuchsia % Fuchsia Approximate PANTONE 248 |
| 119 |
\newColor Lavender % Lavender Approximate PANTONE 223 |
| 120 |
\newColor Thistle % Thistle Approximate PANTONE 245 |
| 121 |
\newColor Orchid % Orchid Approximate PANTONE 252 |
| 122 |
\newColor DarkOrchid % DarkOrchid No PANTONE match |
| 123 |
\newColor Purple % Purple Approximate PANTONE PURPLE |
| 124 |
\newColor Plum % Plum VERY-Approx PANTONE 518 |
| 125 |
\newColor Violet % Violet Approximate PANTONE VIOLET |
| 126 |
\newColor RoyalPurple % RoyalPurple Approximate PANTONE 267 |
| 127 |
\newColor BlueViolet % BlueViolet Approximate PANTONE 2755 |
| 128 |
\newColor Periwinkle % Periwinkle Approximate PANTONE 2715 |
| 129 |
\newColor CadetBlue % CadetBlue Approximate PANTONE (534+535)/2 |
| 130 |
\newColor CornflowerBlue % CornflowerBlue Approximate PANTONE 292 |
| 131 |
\newColor MidnightBlue % MidnightBlue Approximate PANTONE 302 |
| 132 |
\newColor NavyBlue % NavyBlue Approximate PANTONE 293 |
| 133 |
\newColor RoyalBlue % RoyalBlue No PANTONE match |
| 134 |
\newColor Blue % Blue Approximate PANTONE BLUE-072 |
| 135 |
\newColor Cerulean % Cerulean Approximate PANTONE 3005 |
| 136 |
\newColor Cyan % Cyan Approximate PANTONE PROCESS-CYAN |
| 137 |
\newColor ProcessBlue % ProcessBlue Approximate PANTONE PROCESS-BLUE |
| 138 |
\newColor SkyBlue % SkyBlue Approximate PANTONE 2985 |
| 139 |
\newColor Turquoise % Turquoise Approximate PANTONE (312+313)/2 |
| 140 |
\newColor TealBlue % TealBlue Approximate PANTONE 3145 |
| 141 |
\newColor Aquamarine % Aquamarine Approximate PANTONE 3135 |
| 142 |
\newColor BlueGreen % BlueGreen Approximate PANTONE 320 |
| 143 |
\newColor Emerald % Emerald No PANTONE match |
| 144 |
\newColor JungleGreen % JungleGreen Approximate PANTONE 328 |
| 145 |
\newColor SeaGreen % SeaGreen Approximate PANTONE 3268 |
| 146 |
\newColor Green % Green VERY-Approx PANTONE GREEN |
| 147 |
\newColor ForestGreen % ForestGreen Approximate PANTONE 349 |
| 148 |
\newColor PineGreen % PineGreen Approximate PANTONE 323 |
| 149 |
\newColor LimeGreen % LimeGreen No PANTONE match |
| 150 |
\newColor YellowGreen % YellowGreen Approximate PANTONE 375 |
| 151 |
\newColor SpringGreen % SpringGreen Approximate PANTONE 381 |
| 152 |
\newColor OliveGreen % OliveGreen Approximate PANTONE 582 |
| 153 |
\newColor RawSienna % RawSienna Approximate PANTONE 154 |
| 154 |
\newColor Sepia % Sepia Approximate PANTONE 161 |
| 155 |
\newColor Brown % Brown Approximate PANTONE 1615 |
| 156 |
\newColor Tan % Tan No PANTONE match |
| 157 |
\newColor Gray % Gray Approximate PANTONE COOL-GRAY-8 |
| 158 |
\newColor Black % Black Approximate PANTONE PROCESS-BLACK |
| 159 |
\newColor White % White No PANTONE match |
| 160 |
|
| 161 |
% Now we make sure that we initialize the global color to Black |
| 162 |
\subdef{Black} |