\documentclass[a4j]{jarticle}
\usepackage{color,graphicx}
\def\wnc#1{\textcolor[named]{#1}{#1}}
\def\bnc#1{\colorbox[named]{Black}{\textcolor[named]{#1}{#1}}}
\def\gray#1{\textcolor[gray]{#1}{#1}}
\def\gc#1{\colorbox[gray]{#1}{}}
\def\cmygc#1{\colorbox[cmyk]{#1,#1,#1,0}{}}
\def\kgc#1{\colorbox[cmyk]{0,0,0,#1}{}}
\def\cgc#1{\colorbox[cmyk]{#1,0,0,0}{}}
\def\mgc#1{\colorbox[cmyk]{0,#1,0,0}{}}
\def\ygc#1{\colorbox[cmyk]{0,0,#1,0}{}}
\def\rgbgc#1{\colorbox[rgb]{#1,#1,#1}{}}
\def\rgc#1{\colorbox[rgb]{#1,0,0}{}}
\def\ggc#1{\colorbox[rgb]{0,#1,0}{}}
\def\bgc#1{\colorbox[rgb]{0,0,#1}{}}
\title{color.sty$B$N;HMQNc(B}
\author{$BFb;3(B $B9'7{(B}
\date{1999$BG/(B8$B7n(B30$BF|(B}

\begin{document}
\maketitle
\section{Named color}
$BJ8;z!"J8;z$NGX7J$*$h$SJ8;z$NGX7J$H$=$NOH$r$"$i$+$8$aDj5A$5$l$F$$$k?'$K(B
$B$h$C$FCe?'$9$k$3$H$,$G$-$k!#(B
$B=q<0$rI=(B\ref{tbl:namedcolor}$B$K<($9!#(B
$BGX7J$rCe?'$7!"$5$i$KJ8;z$bCe?'$9$k>l9g$K$O!"(B\verb+\colorbox+$B$NJ8;zNs$K(B
\verb+\textcolor+$B$r;HMQ$9$k!#(B
dvips$B$N(Bcolor.pro$B$K(BCMYK$B$GDj5A$5$l$F$$$k!#Dj5A$5$l$F$$$k$9$Y$F$N?'$r(B
$BGrGX7J$GI=(B\ref{tbl:namedw}$B$K!"9uGX7J$GI=(B\ref{tbl:namedb}$B$K<($9!#(B
$BGrGX7J$KGrJ8;z$H9uGX7J$K9uJ8;z$O!"J8;z$,8+$($J$/$F@5>o$G$"$k!#(B

\begin{table}[htbp]
\begin{center}
\caption{Named Color$B$N=q<0(B}
\label{tbl:namedcolor}
\begin{tabular}{l|l}
\hline
$B5!G=(B & $B=q<0(B \\
$B%3%^%s%INc(B & $BI=<(Nc(B \\
\hline
$BJ8;zNs$rCe?'!!(B& \verb+\textcolor[named]{$B?'L>(B}{$BJ8;zNs(B}+ \\
\verb+\textcolor[named]{Red}{$B@V$$$j$s$4(B}+ & \textcolor[named]{Red}{$B@V$$$j$s$4(B} \\
\hline
$BJ8;zNs$NGX7J$KCe?'(B & \verb+\colorbox[named]{$B?'L>(B}{$BJ8;zNs(B}+ \\
\verb+\colorbox[named]{Green}{$BNP$N%T!<%^%s(B}+ & \colorbox[named]{Green}{$BNP$N%T!<%^%s(B} \\
\hline
$BJ8;zNs$NGX7J$H$=$NOH$KCe?'(B & \verb+\fcolorbox[named]{$BOH?'L>(B}{$B?'L>(B}{$BJ8;zNs(B}+ \\
\verb+\fcolorbox[named]{Green}{Red}{$B@V$$%T!<%^%s(B}+ & \fcolorbox[named]{Green}{Red}{$B@V$$%T!<%^%s(B} \\
\hline
\end{tabular}
\end{center}
\end{table}

\begin{table}[htbp]
\begin{center}
\caption{Named Color ($BGrGX7J(B)}
\label{tbl:namedw}
\begin{tabular}{cccccc}
\wnc{GreenYellow} & \wnc{Yellow} & \wnc{Goldenrod} &
\wnc{Dandelion} & \wnc{Apricot} & \wnc{Peach} \\
\wnc{Melon} & \wnc{YellowOrange} & \wnc{Orange} &
\wnc{BurntOrange} & \wnc{Bittersweet} & \wnc{RedOrange} \\
\wnc{Mahogany} & \wnc{Maroon} & \wnc{BrickRed} &
\wnc{Red} & \wnc{OrangeRed} & \wnc{RubineRed} \\
\wnc{WildStrawberry} & \wnc{Salmon} & \wnc{CarnationPink} &
\wnc{Magenta} & \wnc{VioletRed} & \wnc{Rhodamine} \\
\wnc{Mulberry} & \wnc{RedViolet} & \wnc{Fuchsia} &
\wnc{Lavender} & \wnc{Thistle} & \wnc{Orchid} \\
\wnc{DarkOrchid} & \wnc{Purple} & \wnc{Plum} &
\wnc{Violet} & \wnc{RoyalPurple} & \wnc{BlueViolet} \\
\wnc{Periwinkle} & \wnc{CadetBlue} & \wnc{CornflowerBlue} &
\wnc{MidnightBlue} & \wnc{NavyBlue} & \wnc{RoyalBlue} \\
\wnc{Blue} & \wnc{Cerulean} & \wnc{Cyan} &
\wnc{ProcessBlue} & \wnc{SkyBlue} & \wnc{Turquoise} \\
\wnc{TealBlue} & \wnc{Aquamarine} & \wnc{BlueGreen} &
\wnc{Emerald} & \wnc{JungleGreen} & \wnc{SeaGreen} \\
\wnc{Green} & \wnc{ForestGreen} & \wnc{PineGreen} &
\wnc{LimeGreen} & \wnc{YellowGreen} & \wnc{SpringGreen} \\
\wnc{OliveGreen} & \wnc{RawSienna} & \wnc{Sepia} &
\wnc{Brown} & \wnc{Tan} & \wnc{Gray} \\
\wnc{Black} & \wnc{White} & 
\end{tabular} 
\end{center}
\end{table}

\begin{table}[htbp]
\begin{center}
\caption{Named Color ($B9uGX7J(B)}
\label{tbl:namedb}
\begin{tabular}{cccccc}
\bnc{GreenYellow} & \bnc{Yellow} & \bnc{Goldenrod} &
\bnc{Dandelion} & \bnc{Apricot} & \bnc{Peach} \\
\bnc{Melon} & \bnc{YellowOrange} & \bnc{Orange} &
\bnc{BurntOrange} & \bnc{Bittersweet} & \bnc{RedOrange} \\
\bnc{Mahogany} & \bnc{Maroon} & \bnc{BrickRed} &
\bnc{Red} & \bnc{OrangeRed} & \bnc{RubineRed} \\
\bnc{WildStrawberry} & \bnc{Salmon} & \bnc{CarnationPink} &
\bnc{Magenta} & \bnc{VioletRed} & \bnc{Rhodamine} \\
\bnc{Mulberry} & \bnc{RedViolet} & \bnc{Fuchsia} &
\bnc{Lavender} & \bnc{Thistle} & \bnc{Orchid} \\
\bnc{DarkOrchid} & \bnc{Purple} & \bnc{Plum} &
\bnc{Violet} & \bnc{RoyalPurple} & \bnc{BlueViolet} \\
\bnc{Periwinkle} & \bnc{CadetBlue} & \bnc{CornflowerBlue} &
\bnc{MidnightBlue} & \bnc{NavyBlue} & \bnc{RoyalBlue} \\
\bnc{Blue} & \bnc{Cerulean} & \bnc{Cyan} &
\bnc{ProcessBlue} & \bnc{SkyBlue} & \bnc{Turquoise} \\
\bnc{TealBlue} & \bnc{Aquamarine} & \bnc{BlueGreen} &
\bnc{Emerald} & \bnc{JungleGreen} & \bnc{SeaGreen} \\
\bnc{Green} & \bnc{ForestGreen} & \bnc{PineGreen} &
\bnc{LimeGreen} & \bnc{YellowGreen} & \bnc{SpringGreen} \\
\bnc{OliveGreen} & \bnc{RawSienna} & \bnc{Sepia} &
\bnc{Brown} & \bnc{Tan} & \bnc{Gray} \\
\bnc{Black} & \bnc{White} & 
\end{tabular} 
\end{center}
\end{table}

\section{$B%f!<%6Dj5A(B}
\definecolor{rgbred}{rgb}{1.0, 0.0, 0.0}
\definecolor{cmykred}{cmyk}{0.0, 1.0, 1.0, 0.0}
RGB$B$GDj5A$7$?(B\textcolor{rgbred}{$B@V(B}$B$H(BCMYK$B$GDj5A$7$?(B\textcolor{cmykred}{$B@V(B}$B!#(B
$BDj5A$NNc$rI=(B\ref{tbl:userdef}$B$N$K<($9!#(B

\begin{table}[htbp]
\begin{center}
\caption{$B%f!<%6$,Dj5A$9$k?'$N=q<0(B}
\label{tbl:userdef}
\begin{tabular}{l|l|l}
\hline
$B5!G=(B & $B=q<0(B &$B%3%^%s%INc(B \\
\hline
RGB & \verb+\definecolor{$B?'L>(B}{rgb}{R, G, B}+ &
\verb+\definecolor{rgbred}{rgb}{1.0, 0.0, 0.0}+ \\
CMYK & \verb+\definecolor{$B?'L>(B}{cmyk}{C, M, Y, K}+ &
\verb+\definecolor{cmykred}{cmyk}{0.0, 1.0, 1.0, 0.0}+ \\
Gray & \verb+\definecolor{$B?'L>(B}{gray}{I}+ &
\verb+\definecolor{mygray}{gray}{0.75}+ \\
\hline
\end{tabular}
\end{center}
\end{table}

\section{$BD>@\;XDj(B}
\verb+\definecolor+$B$r;HMQ$;$:$K!"D>@\(BRGB, CMYK$B$d(BGray$B$G?'$r;XDj$9$k!#(B
$BI=(B\ref{tbl:direct}$B$K$O!"%0%l%$%9%1!<%k$rD>@\$7$F$9$kNc$r<($9!#(B
\begin{table}[htbp]
\begin{center}
\caption{$BD>@\;XDj$NNc(B}
\label{tbl:direct}
\begin{tabular}{c|l|c}
$B%0%l%$%l%Y%k(B & $B=q<0(B & $BI=<(Nc(B \\
\hline
0 ($B9u(B) & \verb+\textcolor[gray]{0}{0}+ & \gray{0} \\
0.1 & \verb+\textcolor[gray]{0.1}{0.1}+ & \gray{0.1} \\
0.2 & \verb+\textcolor[gray]{0.2}{0.2}+ & \gray{0.2} \\
0.3 & \verb+\textcolor[gray]{0.3}{0.3}+ & \gray{0.3} \\
0.4 & \verb+\textcolor[gray]{0.4}{0.4}+ & \gray{0.4} \\
0.5 & \verb+\textcolor[gray]{0.5}{0.5}+ & \gray{0.5} \\
0.6 & \verb+\textcolor[gray]{0.6}{0.6}+ & \gray{0.6} \\
0.7 & \verb+\textcolor[gray]{0.7}{0.7}+ & \gray{0.7} \\
0.8 & \verb+\textcolor[gray]{0.8}{0.8}+ & \gray{0.8} \\
0.9 & \verb+\textcolor[gray]{0.9}{0.9}+ & \gray{0.9} \\
1.0 ($BGr(B) & \verb+\textcolor[gray]{1.0}{1.0}+ & \gray{1.0} \\
\hline
\end{tabular}
\end{center}
\end{table}

$B%0%l%$%9%1!<%k!"(BCMYK$B$N(BCMY$B!"(BCMYK$B$N(BK$B!"(BRGB$B!"(BR$B!"(BG$B!"(BB$B$G(B51$BCJ3,$N(B
$B%A%c!<%H$r!"?'$ND>@\;XDj$rMQ$$$F;H$C$?Nc$rI=(B\ref{tbl:gray}$B$K<($9!#(B

\begin{table}
\begin{center}
\caption{$B%+%i!<%A%c!<%H(B}
\label{tbl:gray}
\begin{tabular}{c|c}
$B%b!<%I(B & $B%A%c!<%H(B \\
\hline
$B%0%l%$%l%Y%k(B &
\gc{0.0}\gc{0.02}\gc{0.04}\gc{0.06}\gc{0.08}%
\gc{0.10}\gc{0.12}\gc{0.14}\gc{0.16}\gc{0.18}%
\gc{0.20}\gc{0.22}\gc{0.24}\gc{0.26}\gc{0.28}%
\gc{0.30}\gc{0.32}\gc{0.34}\gc{0.36}\gc{0.38}%
\gc{0.40}\gc{0.42}\gc{0.44}\gc{0.46}\gc{0.48}%
\gc{0.50}\gc{0.52}\gc{0.54}\gc{0.56}\gc{0.58}%
\gc{0.60}\gc{0.62}\gc{0.64}\gc{0.66}\gc{0.68}%
\gc{0.70}\gc{0.72}\gc{0.74}\gc{0.76}\gc{0.78}%
\gc{0.80}\gc{0.82}\gc{0.84}\gc{0.86}\gc{0.88}%
\gc{0.90}\gc{0.92}\gc{0.94}\gc{0.96}\gc{0.98}\gc{1.0} \\
CMYK$B$N(BCMY &
\cmygc{0.0}\cmygc{0.02}\cmygc{0.04}\cmygc{0.06}\cmygc{0.08}%
\cmygc{0.10}\cmygc{0.12}\cmygc{0.14}\cmygc{0.16}\cmygc{0.18}%
\cmygc{0.20}\cmygc{0.22}\cmygc{0.24}\cmygc{0.26}\cmygc{0.28}%
\cmygc{0.30}\cmygc{0.32}\cmygc{0.34}\cmygc{0.36}\cmygc{0.38}%
\cmygc{0.40}\cmygc{0.42}\cmygc{0.44}\cmygc{0.46}\cmygc{0.48}%
\cmygc{0.50}\cmygc{0.52}\cmygc{0.54}\cmygc{0.56}\cmygc{0.58}%
\cmygc{0.60}\cmygc{0.62}\cmygc{0.64}\cmygc{0.66}\cmygc{0.68}%
\cmygc{0.70}\cmygc{0.72}\cmygc{0.74}\cmygc{0.76}\cmygc{0.78}%
\cmygc{0.80}\cmygc{0.82}\cmygc{0.84}\cmygc{0.86}\cmygc{0.88}%
\cmygc{0.90}\cmygc{0.92}\cmygc{0.94}\cmygc{0.96}\cmygc{0.98}\cmygc{1.0} \\
CMYK$B$N(BK &
\kgc{0.0}\kgc{0.02}\kgc{0.04}\kgc{0.06}\kgc{0.08}%
\kgc{0.10}\kgc{0.12}\kgc{0.14}\kgc{0.16}\kgc{0.18}%
\kgc{0.20}\kgc{0.22}\kgc{0.24}\kgc{0.26}\kgc{0.28}%
\kgc{0.30}\kgc{0.32}\kgc{0.34}\kgc{0.36}\kgc{0.38}%
\kgc{0.40}\kgc{0.42}\kgc{0.44}\kgc{0.46}\kgc{0.48}%
\kgc{0.50}\kgc{0.52}\kgc{0.54}\kgc{0.56}\kgc{0.58}%
\kgc{0.60}\kgc{0.62}\kgc{0.64}\kgc{0.66}\kgc{0.68}%
\kgc{0.70}\kgc{0.72}\kgc{0.74}\kgc{0.76}\kgc{0.78}%
\kgc{0.80}\kgc{0.82}\kgc{0.84}\kgc{0.86}\kgc{0.88}%
\kgc{0.90}\kgc{0.92}\kgc{0.94}\kgc{0.96}\kgc{0.98}\kgc{1.0} \\
CMYK$B$N(BC &
\cgc{0.0}\cgc{0.02}\cgc{0.04}\cgc{0.06}\cgc{0.08}%
\cgc{0.10}\cgc{0.12}\cgc{0.14}\cgc{0.16}\cgc{0.18}%
\cgc{0.20}\cgc{0.22}\cgc{0.24}\cgc{0.26}\cgc{0.28}%
\cgc{0.30}\cgc{0.32}\cgc{0.34}\cgc{0.36}\cgc{0.38}%
\cgc{0.40}\cgc{0.42}\cgc{0.44}\cgc{0.46}\cgc{0.48}%
\cgc{0.50}\cgc{0.52}\cgc{0.54}\cgc{0.56}\cgc{0.58}%
\cgc{0.60}\cgc{0.62}\cgc{0.64}\cgc{0.66}\cgc{0.68}%
\cgc{0.70}\cgc{0.72}\cgc{0.74}\cgc{0.76}\cgc{0.78}%
\cgc{0.80}\cgc{0.82}\cgc{0.84}\cgc{0.86}\cgc{0.88}%
\cgc{0.90}\cgc{0.92}\cgc{0.94}\cgc{0.96}\cgc{0.98}\cgc{1.0} \\
CMYK$B$N(BM &
\mgc{0.0}\mgc{0.02}\mgc{0.04}\mgc{0.06}\mgc{0.08}%
\mgc{0.10}\mgc{0.12}\mgc{0.14}\mgc{0.16}\mgc{0.18}%
\mgc{0.20}\mgc{0.22}\mgc{0.24}\mgc{0.26}\mgc{0.28}%
\mgc{0.30}\mgc{0.32}\mgc{0.34}\mgc{0.36}\mgc{0.38}%
\mgc{0.40}\mgc{0.42}\mgc{0.44}\mgc{0.46}\mgc{0.48}%
\mgc{0.50}\mgc{0.52}\mgc{0.54}\mgc{0.56}\mgc{0.58}%
\mgc{0.60}\mgc{0.62}\mgc{0.64}\mgc{0.66}\mgc{0.68}%
\mgc{0.70}\mgc{0.72}\mgc{0.74}\mgc{0.76}\mgc{0.78}%
\mgc{0.80}\mgc{0.82}\mgc{0.84}\mgc{0.86}\mgc{0.88}%
\mgc{0.90}\mgc{0.92}\mgc{0.94}\mgc{0.96}\mgc{0.98}\mgc{1.0} \\
CMYK$B$N(BY &
\ygc{0.0}\ygc{0.02}\ygc{0.04}\ygc{0.06}\ygc{0.08}%
\ygc{0.10}\ygc{0.12}\ygc{0.14}\ygc{0.16}\ygc{0.18}%
\ygc{0.20}\ygc{0.22}\ygc{0.24}\ygc{0.26}\ygc{0.28}%
\ygc{0.30}\ygc{0.32}\ygc{0.34}\ygc{0.36}\ygc{0.38}%
\ygc{0.40}\ygc{0.42}\ygc{0.44}\ygc{0.46}\ygc{0.48}%
\ygc{0.50}\ygc{0.52}\ygc{0.54}\ygc{0.56}\ygc{0.58}%
\ygc{0.60}\ygc{0.62}\ygc{0.64}\ygc{0.66}\ygc{0.68}%
\ygc{0.70}\ygc{0.72}\ygc{0.74}\ygc{0.76}\ygc{0.78}%
\ygc{0.80}\ygc{0.82}\ygc{0.84}\ygc{0.86}\ygc{0.88}%
\ygc{0.90}\ygc{0.92}\ygc{0.94}\ygc{0.96}\ygc{0.98}\ygc{1.0} \\
RGB &
\rgbgc{0.0}\rgbgc{0.02}\rgbgc{0.04}\rgbgc{0.06}\rgbgc{0.08}%
\rgbgc{0.10}\rgbgc{0.12}\rgbgc{0.14}\rgbgc{0.16}\rgbgc{0.18}%
\rgbgc{0.20}\rgbgc{0.22}\rgbgc{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0.20}\ggc{0.22}\ggc{0.24}\ggc{0.26}\ggc{0.28}%
\ggc{0.30}\ggc{0.32}\ggc{0.34}\ggc{0.36}\ggc{0.38}%
\ggc{0.40}\ggc{0.42}\ggc{0.44}\ggc{0.46}\ggc{0.48}%
\ggc{0.50}\ggc{0.52}\ggc{0.54}\ggc{0.56}\ggc{0.58}%
\ggc{0.60}\ggc{0.62}\ggc{0.64}\ggc{0.66}\ggc{0.68}%
\ggc{0.70}\ggc{0.72}\ggc{0.74}\ggc{0.76}\ggc{0.78}%
\ggc{0.80}\ggc{0.82}\ggc{0.84}\ggc{0.86}\ggc{0.88}%
\ggc{0.90}\ggc{0.92}\ggc{0.94}\ggc{0.96}\ggc{0.98}\ggc{1.0}\\
B &
\bgc{0.0}\bgc{0.02}\bgc{0.04}\bgc{0.06}\bgc{0.08}%
\bgc{0.10}\bgc{0.12}\bgc{0.14}\bgc{0.16}\bgc{0.18}%
\bgc{0.20}\bgc{0.22}\bgc{0.24}\bgc{0.26}\bgc{0.28}%
\bgc{0.30}\bgc{0.32}\bgc{0.34}\bgc{0.36}\bgc{0.38}%
\bgc{0.40}\bgc{0.42}\bgc{0.44}\bgc{0.46}\bgc{0.48}%
\bgc{0.50}\bgc{0.52}\bgc{0.54}\bgc{0.56}\bgc{0.58}%
\bgc{0.60}\bgc{0.62}\bgc{0.64}\bgc{0.66}\bgc{0.68}%
\bgc{0.70}\bgc{0.72}\bgc{0.74}\bgc{0.76}\bgc{0.78}%
\bgc{0.80}\bgc{0.82}\bgc{0.84}\bgc{0.86}\bgc{0.88}%
\bgc{0.90}\bgc{0.92}\bgc{0.94}\bgc{0.96}\bgc{0.98}\bgc{1.0}\\

\end{tabular}
\end{center}
\end{table}

\end{document}