# Convert rgb decimals to RGB integers with xcolor

Using xcolor I have a color ared defined as in the following:

\documentclass[12pt]{article}
\usepackage[names,dvipsnames,named]{xcolor}
\definecolor{ared}{rgb}{.647,.129,.149}

\begin{document}

\huge\textsf{\textbf{\textcolor{ared}{HELLO}}}.

\end{document}


Question: How do I find the 3-element integer equivalent of that color?

The reason I ask: I want to use an app to find other colors that harmonize with that reddish color, but to do so they demand I specify the red as a triple of integers.

I tried to do this using a "color picker" app, but when I display a blob of the color on-screen as LaTeX output, the meter gives me rather different decimal values from the .647,.129,.149 I actually start with.

Note: This particular red was shown in the source for memoir's chapter style pederson" by Lars Madsen in the 2006 package from/info/latex-samples/MemoirChapStyles. And thememoirdocumentationmemmancredits Madsen for that "attractive color" for chapter numbers and titles in thepederson style. (Thank you David Carlisle for locating the link to Madsen for me.)

As commented, you can use \convertcolorspec, but for check the values of several colors with several color models, nothing better than the testcolors environment:

\documentclass[12pt]{article}
\usepackage[names,svgnames,dvipsnames,named]{xcolor}
\definecolor{ared}{rgb}{.647,.129,.149}
\begin{document}
\begin{testcolors}[RGB,HTML,HSB]
\testcolor{ared}
\testcolor{DarkRed}
\end{testcolors}
\end{document}

• Where is DarkRed defined? – murray May 16 '20 at 0:29
• @murray In the svgnames` option – Fran May 16 '20 at 0:33