%% color-package-demo.tex %% Bent Petersen Oct 2000 \documentclass[11pt]{article} \usepackage[usenames]{color} \usepackage{fancybox} \usepackage{times} \usepackage{amsmath} \usepackage{amssymb} \usepackage{array} \usepackage{colortbl} \newcommand{\draftfont}{\fontfamily{ptm}\fontseries{b}\fontshape{n}% \fontsize{40}{48pt}\selectfont} \newcommand{\tm}{\fontfamily{ptm}\fontseries{m}\fontshape{n}% \fontsize{11}{13pt}\selectfont} \newcommand{\lbc}[1]{\huge\bfseries\color{#1}} \newcommand{\bs}{$\blacksquare\blacksquare\blacksquare$} \newcommand{\sam}{SAMPLE } \newcommand{\samb}{\cellcolor{black}SAMPLE } \fancyput(0.75in,-0.25in) {\begin{minipage}[]{8in} \color{SpringGreen}\draftfont DRAFT, \today \\ NOT FOR RELEASE! \end{minipage}} %\color{SpringGreen}{\today}} % above, origin is 0, 0. Pos moves x to right, neg moves y down \title{\Huge\color{Blue}\bfseries\jobname.tex} \author{\Large\bfseries{}Bent Petersen} \date{\Large\bfseries{}Oct 24, 2000} \pagestyle{plain} \setlength{\parindent}{0pt} \setlength{\parskip}{2.0ex plus 0.6ex minus 0.4ex} \begin{document} \maketitle \thispagestyle{empty} The easiest way to use color text in \LaTeXe{} is to use the color package. You load the color package in your preamble as usual \begin{verbatim} \documentclass[11pt]{article} \usepackage[usenames]{color} \end{verbatim} Here the option [usenames] causes the definitions for the 68 colors known to dvips (see next page) to be preloaded. Those colors can then be specified by name. For example \verb={\color{BrickRed} BrickRed}= produces {\color{BrickRed} BrickRed}. Alternately one can use the command \begin{verbatim} \textcolor{BrickRed}{this is BrickRed} \end{verbatim} which produces \textcolor{BrickRed}{this is BrickRed}. If the 68 predefined colors do not suffice, or if you do not want to load the definitions of all of them, you may define your own custom colors. Here is a dark blue defined in terms of the RGB (red, green, blue) color model. \begin{verbatim} \definecolor{MyDarkBlue}{rgb}{0,0.08,0.45} \begin{center} {\color{MyDarkBlue}This color is MyDarkBlue} \end{center} \end{verbatim} %% \definecolor{MyDarkBlue}{rgb}{0.1,0,0.55} \begin{center} {\color{MyDarkBlue}This color is MyDarkBlue} \end{center} %% Once we have defined the new color we can use it anywhere in the current document. For example, \verb=\textcolor{MyDarkBlue}{a nice blue}= produces \textcolor{MyDarkBlue}{a nice blue}. Custom colors may also be defined in terms of the CMYK (cyan, magenta, yellow, black) color model. Here is a light magenta. %% \begin{verbatim} \definecolor{MyLightMagenta}{cmyk}{0.1,0.8,0,0.1} \begin{center} {\color{MyLightMagenta}This color is MyLightMagenta} \end{center} \end{verbatim} %% \definecolor{MyLightMagenta}{cmyk}{0.1,0.8,0,0.1} \begin{center} {\color{MyLightMagenta}This color is MyLightMagenta} \end{center} \newpage \begin{center} {\Large\bfseries{} The 68 standard colors known to dvips\vspace{0.5ex}} \end{center} \hspace*{-1.5in} {\huge \begin{tabular}{|l|l|l|l|} \hline {\lbc{Apricot} Apricot}& {\lbc{Aquamarine} Aquamarine}& {\lbc{Bittersweet} Bittersweet}& {\lbc{Black} Black}\\ \hline {\lbc{Blue} Blue}& {\lbc{BlueGreen} BlueGreen}& {\lbc{BlueViolet} BlueViolet}& {\lbc{BrickRed} BrickRed}\\ \hline {\lbc{Brown} Brown}& {\lbc{BurntOrange} BurntOrange}& {\lbc{CadetBlue} CadetBlue}& {\lbc{CarnationPink} CarnationPink}\\ \hline {\lbc{Cerulean} Cerulean}& {\lbc{CornflowerBlue} CornflowerBlue}& {\lbc{Cyan} Cyan}& {\lbc{Dandelion} Dandelion}\\ \hline {\lbc{DarkOrchid} DarkOrchid}& {\lbc{Emerald} Emerald}& {\lbc{ForestGreen} ForestGreen}& {\lbc{Fuchsia} Fuchsia}\\ \hline {\lbc{Goldenrod} Goldenrod}& {\lbc{Gray} Gray}& {\lbc{Green} Green}& {\lbc{GreenYellow} GreenYellow}\\ \hline {\lbc{JungleGreen} JungleGreen}& {\lbc{Lavender} Lavender}& {\lbc{LimeGreen} LimeGreen}& {\lbc{Magenta} Magenta}\\ \hline {\lbc{Mahogany} Mahogany}& {\lbc{Maroon} Maroon}& {\lbc{Melon} Melon}& {\lbc{MidnightBlue} MidnightBlue}\\ \hline {\lbc{Mulberry} Mulberry}& {\lbc{NavyBlue} NavyBlue}& {\lbc{OliveGreen} OliveGreen}& {\lbc{Orange} Orange}\\ \hline {\lbc{OrangeRed} OrangeRed}& {\lbc{Orchid} Orchid}& {\lbc{Peach} Peach}& {\lbc{Periwinkle} Periwinkle}\\ \hline {\lbc{PineGreen} PineGreen}& {\lbc{Plum} Plum}& {\lbc{ProcessBlue} ProcessBlue}& {\lbc{Purple} Purple}\\ \hline {\lbc{RawSienna} RawSienna}& {\lbc{Red} Red}& {\lbc{RedOrange} RedOrange}& {\lbc{RedViolet} RedViolet}\\ \hline {\lbc{Rhodamine} Rhodamine}& {\lbc{RoyalBlue} RoyalBlue}& {\lbc{RoyalPurple} RoyalPurple}& {\lbc{RubineRed} RubineRed}\\ \hline {\lbc{Salmon} Salmon}& {\lbc{SeaGreen} SeaGreen}& {\lbc{Sepia} Sepia}& {\lbc{SkyBlue} SkyBlue}\\ \hline {\lbc{SpringGreen} SpringGreen}& {\lbc{Tan} Tan}& {\lbc{TealBlue} TealBlue}& {\lbc{Thistle} Thistle}\\ \hline {\lbc{Turquoise} Turquoise}& {\lbc{Violet} Violet}& {\lbc{VioletRed} VioletRed}& {\lbc{White} White}\\ \hline {\lbc{WildStrawberry} WildStrawberry}& {\lbc{Yellow} Yellow}& {\lbc{YellowGreen} YellowGreen}& {\lbc{YellowOrange} YellowOrange}\\ \hline \end{tabular} \newpage \begin{center} {\Large\bfseries{} The 68 colors (black background)\vspace{0.5ex}} \end{center} \hspace*{-1.5in} %{\Large \begin{tabular}{|>{\columncolor{black}}l|>{\columncolor{black}}l| >{\columncolor{black}}l|>{\columncolor{black}}l|} \hline {\lbc{Apricot} Apricot}& {\lbc{Aquamarine} Aquamarine}& {\lbc{Bittersweet} Bittersweet}& {\lbc{Black} Black}\\ \hline {\lbc{Blue} Blue}& {\lbc{BlueGreen} BlueGreen}& {\lbc{BlueViolet} BlueViolet}& {\lbc{BrickRed} BrickRed}\\ \hline {\lbc{Brown} Brown}& {\lbc{BurntOrange} BurntOrange}& {\lbc{CadetBlue} CadetBlue}& {\lbc{CarnationPink} CarnationPink}\\ \hline {\lbc{Cerulean} Cerulean}& {\lbc{CornflowerBlue} CornflowerBlue}& {\lbc{Cyan} Cyan}& {\lbc{Dandelion} Dandelion}\\ \hline {\lbc{DarkOrchid} DarkOrchid}& {\lbc{Emerald} Emerald}& {\lbc{ForestGreen} ForestGreen}& {\lbc{Fuchsia} Fuchsia}\\ \hline {\lbc{Goldenrod} Goldenrod}& {\lbc{Gray} Gray}& {\lbc{Green} Green}& {\lbc{GreenYellow} GreenYellow}\\ \hline {\lbc{JungleGreen} JungleGreen}& {\lbc{Lavender} Lavender}& {\lbc{LimeGreen} LimeGreen}& {\lbc{Magenta} Magenta}\\ \hline {\lbc{Mahogany} Mahogany}& {\lbc{Maroon} Maroon}& {\lbc{Melon} Melon}& {\lbc{MidnightBlue} MidnightBlue}\\ \hline {\lbc{Mulberry} Mulberry}& {\lbc{NavyBlue} NavyBlue}& {\lbc{OliveGreen} OliveGreen}& {\lbc{Orange} Orange}\\ \hline {\lbc{OrangeRed} OrangeRed}& {\lbc{Orchid} Orchid}& {\lbc{Peach} Peach}& {\lbc{Periwinkle} Periwinkle}\\ \hline {\lbc{PineGreen} PineGreen}& {\lbc{Plum} Plum}& {\lbc{ProcessBlue} ProcessBlue}& {\lbc{Purple} Purple}\\ \hline {\lbc{RawSienna} RawSienna}& {\lbc{Red} Red}& {\lbc{RedOrange} RedOrange}& {\lbc{RedViolet} RedViolet}\\ \hline {\lbc{Rhodamine} Rhodamine}& {\lbc{RoyalBlue} RoyalBlue}& {\lbc{RoyalPurple} RoyalPurple}& {\lbc{RubineRed} RubineRed}\\ \hline {\lbc{Salmon} Salmon}& {\lbc{SeaGreen} SeaGreen}& {\lbc{Sepia} Sepia}& {\lbc{SkyBlue} SkyBlue}\\ \hline {\lbc{SpringGreen} SpringGreen}& {\lbc{Tan} Tan}& {\lbc{TealBlue} TealBlue}& {\lbc{Thistle} Thistle}\\ \hline {\lbc{Turquoise} Turquoise}& {\lbc{Violet} Violet}& {\lbc{VioletRed} VioletRed}& {\lbc{White} White}\\ \hline {\lbc{WildStrawberry} WildStrawberry}& {\lbc{Yellow} Yellow}& {\lbc{YellowGreen} YellowGreen}& {\lbc{YellowOrange} YellowOrange}\\ \hline \end{tabular} \begin{center}{\Large\bfseries CMYK values for the colors \\ (arranged by appearance)} \end{center} \newpage \hspace*{-1.5in} \begin{tabular}{lrr} /GreenYellow 0.15 0 0.69 0 & {\lbc{GreenYellow} \bs \sam\bs} & {\lbc{GreenYellow}\samb} \\ /Yellow 0 0 1 0 & {\lbc{Yellow} \bs \sam\bs} & {\lbc{Yellow}\samb} \\ /Goldenrod 0 0.10 0.84 0 & {\lbc{Goldenrod} \bs \sam\bs} & {\lbc{Goldenrod}\samb} \\ /Dandelion 0 0.29 0.84 0 & {\lbc{Dandelion} \bs \sam\bs} & {\lbc{Dandelion}\samb} \\ /Apricot 0 0.32 0.52 0 & {\lbc{Apricot} \bs \sam\bs} & {\lbc{Apricot}\samb} \\ /Peach 0 0.50 0.70 0 & {\lbc{Peach} \bs \sam\bs} & {\lbc{Peach}\samb} \\ /Melon 0 0.46 0.50 0 & {\lbc{Melon} \bs \sam\bs} & {\lbc{Melon}\samb} \\ /YellowOrange 0 0.42 1 0 & {\lbc{YellowOrange} \bs \sam\bs} & {\lbc{YellowOrange}\samb} \\ /Orange 0 0.61 0.87 0 & {\lbc{Orange} \bs \sam\bs} & {\lbc{Orange}\samb} \\ /BurntOrange 0 0.51 1 0 & {\lbc{BurntOrange} \bs \sam\bs} & {\lbc{BurntOrange}\samb} \\ /Bittersweet 0 0.75 1 0.24 & {\lbc{Bittersweet} \bs \sam\bs} & {\lbc{Bittersweet}\samb} \\ /RedOrange 0 0.77 0.87 0 & {\lbc{RedOrange} \bs \sam\bs} & {\lbc{RedOrange}\samb} \\ /Mahogany 0 0.85 0.87 0.35 & {\lbc{Mahogany} \bs \sam\bs} & {\lbc{Mahogany}\samb} \\ /Maroon 0 0.87 0.68 0.32 & {\lbc{Maroon} \bs \sam\bs} & {\lbc{Maroon}\samb} \\ /BrickRed 0 0.89 0.94 0.28 & {\lbc{BrickRed} \bs \sam\bs} & {\lbc{BrickRed}\samb} \\ /Red 0 1 1 0 & {\lbc{Red} \bs \sam\bs} & {\lbc{Red}\samb} \\ /OrangeRed 0 1 0.50 0 & {\lbc{OrangeRed} \bs \sam\bs} & {\lbc{OrangeRed}\samb} \\ /RubineRed 0 1 0.13 0 & {\lbc{RubineRed} \bs \sam\bs} & {\lbc{RubineRed}\samb} \\ /WildStrawberry 0 0.96 0.39 0 & {\lbc{WildStrawberry} \bs \sam\bs} & {\lbc{WildStrawberry}\samb} \\ /Salmon 0 0.53 0.38 0 & {\lbc{Salmon} \bs \sam\bs} & {\lbc{Salmon}\samb} \\ /CarnationPink 0 0.63 0 0 & {\lbc{CarnationPink} \bs \sam\bs} & {\lbc{CarnationPink}\samb} \\ /Magenta 0 1 0 0 & {\lbc{Magenta} \bs \sam\bs} & {\lbc{Magenta}\samb} \\ \end{tabular} \hspace*{-1.5in} \begin{tabular}{lrr} /VioletRed 0 0.81 0 0 & {\lbc{VioletRed} \bs \sam\bs} & {\lbc{VioletRed}\samb} \\ /Rhodamine 0 0.82 0 0 & {\lbc{Rhodamine} \bs \sam\bs} & {\lbc{Rhodamine}\samb} \\ /Mulberry 0.34 0.90 0 0.02 & {\lbc{Mulberry} \bs \sam\bs} & {\lbc{Mulberry}\samb} \\ /RedViolet 0.07 0.90 0 0.34 & {\lbc{RedViolet} \bs \sam\bs} & {\lbc{RedViolet}\samb} \\ /Fuchsia 0.47 0.91 0 0.08 & {\lbc{Fuchsia} \bs \sam\bs} & {\lbc{Fuchsia}\samb} \\ /Lavender 0 0.48 0 0 & {\lbc{Lavender} \bs \sam\bs} & {\lbc{Lavender}\samb} \\ /Thistle 0.12 0.59 0 0 & {\lbc{Thistle} \bs \sam\bs} & {\lbc{Thistle}\samb} \\ /Orchid 0.32 0.64 0 0 & {\lbc{Orchid} \bs \sam\bs} & {\lbc{Orchid}\samb} \\ /DarkOrchid 0.40 0.80 0.20 0 & {\lbc{DarkOrchid} \bs \sam\bs} & {\lbc{DarkOrchid}\samb} \\ /Purple 0.45 0.86 0 0 & {\lbc{Purple} \bs \sam\bs} & {\lbc{Purple}\samb} \\ /Plum 0.50 1 0 0 & {\lbc{Plum} \bs \sam\bs} & {\lbc{Plum}\samb} \\ /Violet 0.79 0.88 0 0 & {\lbc{Violet} \bs \sam\bs} & {\lbc{Violet}\samb} \\ /RoyalPurple 0.75 0.90 0 0 & {\lbc{RoyalPurple} \bs \sam\bs} & {\lbc{RoyalPurple}\samb} \\ /BlueViolet 0.86 0.91 0 0.04 & {\lbc{BlueViolet} \bs \sam\bs} & {\lbc{BlueViolet}\samb} \\ /Periwinkle 0.57 0.55 0 0 & {\lbc{Periwinkle} \bs \sam\bs} & {\lbc{Periwinkle}\samb} \\ /CadetBlue 0.62 0.57 0.23 0 & {\lbc{CadetBlue} \bs \sam\bs} & {\lbc{CadetBlue}\samb} \\ /CornflowerBlue 0.65 0.13 0 0 & {\lbc{CornflowerBlue} \bs \sam\bs} & {\lbc{CornflowerBlue}\samb} \\ /MidnightBlue 0.98 0.13 0 0.43 & {\lbc{MidnightBlue} \bs \sam\bs} & {\lbc{MidnightBlue}\samb} \\ /NavyBlue 0.94 0.54 0 0 & {\lbc{NavyBlue} \bs \sam\bs} & {\lbc{NavyBlue}\samb} \\ /RoyalBlue 1 0.50 0 0 & {\lbc{RoyalBlue} \bs \sam\bs} & {\lbc{RoyalBlue}\samb} \\ /Blue 1 1 0 0 & {\lbc{Blue} \bs \sam\bs} & {\lbc{Blue}\samb} \\ /Cerulean 0.94 0.11 0 0 & {\lbc{Cerulean} \bs \sam\bs} & {\lbc{Cerulean}\samb} \\ /Cyan 1 0 0 0 & {\lbc{Cyan} \bs \sam\bs} & {\lbc{Cyan}\samb} \\ \end{tabular} \hspace*{-1.5in} \begin{tabular}{lrr} /ProcessBlue 0.96 0 0 0 & {\lbc{ProcessBlue} \bs \sam\bs} & {\lbc{ProcessBlue}\samb} \\ /SkyBlue 0.62 0 0.12 0 & {\lbc{SkyBlue} \bs \sam\bs} & {\lbc{SkyBlue}\samb} \\ /Turquoise 0.85 0 0.20 0 & {\lbc{Turquoise} \bs \sam\bs} & {\lbc{Turquoise}\samb} \\ /TealBlue 0.86 0 0.34 0.02 & {\lbc{TealBlue} \bs \sam\bs} & {\lbc{TealBlue}\samb} \\ /Aquamarine 0.82 0 0.30 0 & {\lbc{Aquamarine} \bs \sam\bs} & {\lbc{Aquamarine}\samb} \\ /BlueGreen 0.85 0 0.33 0 & {\lbc{BlueGreen} \bs \sam\bs} & {\lbc{BlueGreen}\samb} \\ /Emerald 1 0 0.50 0 & {\lbc{Emerald} \bs \sam\bs} & {\lbc{Emerald}\samb} \\ /JungleGreen 0.99 0 0.52 0 & {\lbc{JungleGreen} \bs \sam\bs} & {\lbc{JungleGreen}\samb} \\ /SeaGreen 0.69 0 0.50 0 & {\lbc{SeaGreen} \bs \sam\bs} & {\lbc{SeaGreen}\samb} \\ /Green 1 0 1 0 & {\lbc{Green} \bs \sam\bs} & {\lbc{Green}\samb} \\ /ForestGreen 0.91 0 0.88 0.12 & {\lbc{ForestGreen} \bs \sam\bs} & {\lbc{ForestGreen}\samb} \\ /PineGreen 0.92 0 0.59 0.25 & {\lbc{PineGreen} \bs \sam\bs} & {\lbc{PineGreen}\samb} \\ /LimeGreen 0.50 0 1 0 & {\lbc{LimeGreen} \bs \sam\bs} & {\lbc{LimeGreen}\samb} \\ /YellowGreen 0.44 0 0.74 0 & {\lbc{YellowGreen} \bs \sam\bs} & {\lbc{YellowGreen}\samb} \\ /SpringGreen 0.26 0 0.76 0 & {\lbc{SpringGreen} \bs \sam\bs} & {\lbc{SpringGreen}\samb} \\ /OliveGreen 0.64 0 0.95 0.40 & {\lbc{OliveGreen} \bs \sam\bs} & {\lbc{OliveGreen}\samb} \\ /RawSienna 0 0.72 1 0.45 & {\lbc{RawSienna} \bs \sam\bs} & {\lbc{RawSienna}\samb} \\ /Sepia 0 0.83 1 0.70 & {\lbc{Sepia} \bs \sam\bs} & {\lbc{Sepia}\samb} \\ /Brown 0 0.81 1 0.60 & {\lbc{Brown} \bs \sam\bs} & {\lbc{Brown}\samb} \\ /Tan 0.14 0.42 0.56 0 & {\lbc{Tan} \bs \sam\bs} & {\lbc{Tan}\samb} \\ /Gray 0 0 0 0.50 & {\lbc{Gray} \bs \sam\bs} & {\lbc{Gray}\samb} \\ /Black 0 0 0 1 & {\lbc{Black} \bs \sam\bs} & {\lbc{Black}\samb} \\ /White 0 0 0 0 & {\lbc{White} \bs \sam\bs} & {\lbc{White}\samb} \\ \end{tabular} } %\Large \end{document}