1.10.11 Color

<..configure ooffice color..>
 \Configure{color}{\:gobble}
-_-_-

<..configure ooffice color..>+
 \Configure{HColor:gray}{%
    \int:of\:tempa{255}{#1}%
    \hex:of\:tempa
    \Configure{HColor}{}{\#\:tempa\:tempa\:tempa}%
 }
 \Configure{HColor:rgb}{%
    \int:of\:tempa{255}{#1}%
    \int:of\:tempb{255}{#2}%
    \int:of\:tempc{255}{#3}%
    \hex:of\:tempa
    \hex:of\:tempb
    \hex:of\:tempc
    \Configure{HColor}{}{\#\:tempa\:tempb\:tempc}%
 }
 \Configure{HColor:cmyk}{%
    \int:of\:Cyan{255}{#1}%
    \int:of\:Magenta{255}{#2}%
    \int:of\:Yellow{255}{#3}%
    \int:of\:Black{255}{#4}%
    \:cmyk\:tempa\:Cyan
    \:cmyk\:tempb\:Magenta
    \:cmyk\:tempc\:Yellow
    \hex:of\:tempa
    \hex:of\:tempb
    \hex:of\:tempc
    \Configure{HColor}{}{\#\:tempa\:tempb\:tempc}%
 }
 <.HColor util.>
-_-_-

<..HColor util..>
 \def\int:of#1#2#3{%
    \tmp:dim=#3pt \tmp:dim=#2\tmp:dim
    \edef\:temp{\tmp:cnt\the\tmp:dim//}%
    \def#1##1//{}\afterassignment#1\:temp
    \edef#1{\the\tmp:cnt}%
 }
 \def\hex:of#1{%
    \tmp:cnt=#1
    \divide\tmp:cnt by 16
    \edef\:temp{\ifcase \tmp:cnt 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
                                 8\or 9\or A\or B\or C\or D\or E\or F\fi}%
    \multiply\tmp:cnt by -16 \advance\tmp:cnt by #1
    \edef#1{\:temp
            \ifcase \tmp:cnt 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
                                 8\or 9\or A\or B\or C\or D\or E\or F\fi}%
 }
-_-_-
cmyk -> gray  
(1 - 0.299c - 0.587m - 0.114y)(1 - k)  
 
cmyk -> rgb  
Red   = 1-minimum(1,Cyan   *(1-Black)+Black)  
Green = 1-minimum(1,Magenta*(1-Black)+Black)  
Blue  = 1-minimum(1,Yellow *(1-Black)+Black)

<..HColor util..>+
 \def\:cmyk#1#2{%
    \tmp:cnt=255 \advance\tmp:cnt by -\:Black
    \multiply\tmp:cnt by#2 \advance\tmp:cnt by \:Black
    \advance\tmp:cnt by -255 \tmp:cnt=-\tmp:cnt
    \ifnum \tmp:cnt<0 \tmp:cnt=0 \fi
    \edef#1{\the\tmp:cnt}%
 }
-_-_-

The following doesn’t work yet.

\documentclass{article}  
\usepackage[dvips]{xcolor}  
 
\begin{document}  
 
\begin{center}  
\fcolorbox{black}{green}{\parbox{.775\columnwidth}{\textbf{Hint:}\vspace{.2cm}\\ Abc.}}  
\end{center}  
 
 
\begin{center}  
 
\fcolorbox{black}{green}{\parbox{.775\columnwidth}{\textbf{Hint:}\vspace{.2cm}\\ Abc.}}  
 
\fcolorbox{black}{green}{\parbox{.775\columnwidth}{\textbf{Hint:}\vspace{.2cm}\\ Abc.}}  
 
\end{center}  
\end{document}  
 
 
\documentclass {article}  
 
  \usepackage[table,svgnames]{xcolor}  
 
\begin {document}  
 
    \rowcolors[]{1}{gray!10}{gray!5}  
 
    \begin{tabular}{|*{2}{r|c|}}  
      Blue & Red & Yellow & Green\\\hline  
      Blue & Red & Yellow & Green\\  
      Blue & Red & Yellow & Green\\\hline  
      Blue & Red & Yellow & Green\\  
      Blue & Red & Yellow & Green\\  
      Blue & Red & Yellow & Green\\  
      Blue & Red & Yellow & Green\\  
    \end{tabular}  

<..configure ooffice color..>+
 \Configure{fcolorbox}
    {\bgroup\gHAdvance\textcolorN by 1
      \ifvmode \let\v:colorbox\def \IgnorePar \EndP
      \else \let\v:colorbox=\relax \fi
      \ifx \v:colorbox\def
         \HCode{<text:p  \Hnewline
                     text:style-name="colorbox\textcolorN">}%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \let\A:color=\a:color
 \Configure{color}%
     {\Configure{color}%
        {\let\a:color=\A:color
          \Configure{SetHColor}{%
             \OOstyles{<style:style style:name="colorbox\textcolorN"
                                    style:family="paragraph"\>
 %              <style:text-properties style:text-background-color="\HColor"/>
               <style:text-properties fo:color="\HColor"
                                      fo:background-color="transparent" />
            </style:style>}%
        }}%
        \Configure{SetHColor}{%
 %         \hshow{\#colorbox\textcolorN{border: solid 1px  \HColor;}}%
        }%
      }%
      \Configure{fbox}{\leavevmode }{}%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \else
         \HCode{<text:span \Hnewline
                     text:style-name="colorbox\textcolorN">}%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \let\A:color=\a:color
 \Configure{color}%
     {\Configure{color}%
        {\let\a:color=\A:color
          \Configure{SetHColor}{%
             \OOstyles{<style:style style:name="colorbox\textcolorN" style:family="text">
 %              <style:text-properties style:text-background-color="\HColor" />
               <style:text-properties fo:color="\HColor"
                                      fo:background-color="transparent" />
            </style:style>}%
        }}%
        \Configure{SetHColor}{%
 %         \hshow{\#colorbox\textcolorN{border: solid 1px  \HColor;}}%
        }%
      }%
      \Configure{fbox}{\leavevmode }{}%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \fi
 }
 {\ifx \v:colorbox\def
     \EndP\HCode{</text:p>}\par
   \else \HCode{</text:span>}\fi
   \egroup
 }
-_-_-