I have defined a color using:


Then this is used with this command like canvascolor!75!white from xcolor. This is actually done in the beamer theme wkbeamer.

I know the mix of these two colors but how do I output the RGB color of this to match in a paint program. This I figure should be easy. I looked through the xcolor manual and couldn't find how to do this. I also looked through to just see how it determines or algorithm it uses for the new RGB color from the mix but didn't see this. I didn't read the whole manual but from a quick look through I couldn't find the algorithm for this or tried outputting the color with a couple commands but none I could get working.


2 Answers 2


The \extractcolorspec macro will define a macro that contains the specification for a color; we can use it and the companion \convertcolorspec to define a macro containing the specifications for another model:


Now \test will expand to BBC4E1.

The first definition of \test will be {rgb}{0.73225,0.7675,0.88225} so this is good for putting it after \convertcolorspec, but we have to expand it first.

Use two different macros if you also need to keep the first specification around.

We can implement this in a function


With \getColorSpec{HTML}{canvascolor!75!white} the specification will be stored in \getColorSpecTemp; with


the same specification will be stored in \HTMLcolor.

\color{canvas75}RGB colour canvascolor!75!white\\
html : \convertcolorspec{named}{canvas75}{HTML}\HTMLcolour
cmyk : \convertcolorspec{named}{canvas75}{cmyk}\CMYKcolour


enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .