I need to build a table of this type:
STUFF | COLOR | PICTURE | COLOR DEFINITION
To retrieve the color definition, I tried to use \extractcolorspecs expecting that the third argument { color-cmd } would allowed me to print what I needed. The problem is that I defined colors in HTML, while the command gives me RGB format in output. Here is a MWE:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{booktabs}
\usepackage{xcolor}
\definecolor{mapblue}{HTML}{0000FF}%
\definecolor{maproyalblue}{HTML}{0088FF}%
\definecolor{mapskyblue}{HTML}{00CCFF}%
\definecolor{mapgreen}{HTML}{00CC00}%
\definecolor{mapdandelion}{HTML}{FFCC00}%
\definecolor{maporange}{HTML}{FF8800}%
\definecolor{mapred}{HTML}{FF0000}%
\newcommand{\colpic}[1]{\tikz \draw[#1,fill=#1,draw](0,0)circle(0.1cm);}
\newcommand{\colrow}[1]{#1 & \colpic{#1} & \extractcolorspecs{#1}{\model}{\mycolor}\mycolor}
\begin{document}
\begin{tabular}{cccc}
\toprule
\multicolumn{1}{c|}{\textsc{Relevance Interval}} &
\multicolumn{1}{c|}{\textsc{Color}} &
\multicolumn{1}{c|}{\textsc{Picture}} &
\multicolumn{1}{c}{\textsc{ Color Definition}}\\
\midrule
0 - 5 & \colrow{mapblue}\\
5 - 10 & \colrow{maproyalblue}\\
10 - 25 & \colrow{mapskyblue}\\
25 - 50 & \colrow{mapgreen}\\
50 - 100 & \colrow{mapdandelion}\\
100 - 200 & \colrow{maporange}\\
>200 & \colrow{mapred}\\
\bottomrule
\end{tabular}
\end{document}
and this is the output:

How is it possible to obtain the color definition in HTML?


\convertcolorspecin thexcolormanual for conversion. – percusse Apr 09 '12 at 11:24