%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% color.4ht                            2001-12-14-17:07 %
% Copyright (C) 1997--2001      Eitan M. Gurari         %
%                                                       %
% This program can redistributed and/or modified under  %
% the terms of the LaTeX Project Public License         %
% Distributed from CTAN archives in directory           %
% macros/latex/base/lppl.txt; either version 1 of the   %
% License, or (at your option) any later version.       %
%                                                       %
% However, you are allowed to modify this program       %
% without changing its name, if you modify its          %
% signature. Changes to the signature can be introduced %
% with a directive of the form                          %
%            \message{signature}                        %
%                                                       %
%                             gurari@cis.ohio-state.edu %
%                 http://www.cis.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2001-12-14-17:07}


\let\:temp\begingroup
\HLet\color@setgroup\:temp
\def\HColor#1#2{\expandafter\edef\csname CLR:#1\endcsname{#2}}

\NewConfigure{color}{1}
\def\@textcolor#1#2#3{\protect\leavevmode{\protect\a:textcolor
      \color#1{#2}#3\protect\b:textcolor}}
\NewConfigure{textcolor}{2}
   \def\pagecolor{%
  \begingroup \a:pagecolor
      \let\ignorespaces\endgroup
      \let\set@color\set@page@color
      \color}
\NewConfigure{pagecolor}{1}
\def\@undeclaredcolor[#1]#2{\a:color{#2}%
  \@ifundefined{color@#1}%
    {\@latex@error{Undefined color model `#1'}\@ehd}%
    {\csname color@#1\endcsname\current@color{#2}%
     \set@color}%
  \ignorespaces}
\pend:defI\@declaredcolor{\a:color{##1}}
\def\SetHColor#1#2{{%
   \expandafter\let\expandafter\HColor \csname CLR:#2\endcsname
   \ifx \HColor\relax
      \:warning{missing \string\HColor{#2}{...}}%
      \expandafter\global\expandafter\let\csname CLR:#2\endcsname\empty
    \else #1\fi }}

\def\:temp#1#2{%
   \let\a:fcol\empty   \let\b:fcol\empty
   \color@b@x\relax{\color#1{#2}}}
\HLet\color@box\:temp
\def\:temp#1#2#3{%
   \let\a:fcol\a:fcolorbox   \let\b:fcol\b:fcolorbox
   \color@b@x{\fboxsep\z@\color#1{#2}\fbox}{\color#1{#3}}}
\HLet\color@fbox\:temp
\long\def\:temp#1#2#3{%
   \leavevmode
   {\a:fcol #1{\ifcolors@ \a:colorbox\fi #2%
      {\set@color#3}\ifcolors@ \b:colorbox\fi}}\b:fcol}
\HLet\color@b@x\:temp
\NewConfigure{colorbox}{2}
\NewConfigure{fcolorbox}{2}

\Hinput{color}
\endinput

