TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 16 down vote accepted

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.

share|improve this answer
\color{canvas75}RGB colour canvascolor!75!white\\
html : \convertcolorspec{named}{canvas75}{HTML}\HTMLcolour
cmyk : \convertcolorspec{named}{canvas75}{cmyk}\CMYKcolour


enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.