TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 fail to understand the color mixing of xcolor.

I want to have a lighter and a darker version of a color defined as


My approach of lighter and darker is this one


which according to the docs is replaced internally to


Now I wonder what is actually calulated, bcause I get the same for Light and Dark, as can be seen in the following screenshot: enter image description here

share|improve this question
I think white is only taken as default color if there is no second color, so: BlueLUH!20 is taken as BlueLUH!20!white, while BlueLUH!20!white will stay as it is and not taken as BlueLUH!20!white!white. But I could be wrong, of course. – Martin Scharrer Nov 15 '11 at 12:48
@MartinScharrer: that would make sence. Nevertheless how is it calulated? Blue*0.8 + black*0.2 + 1.0*white or blue*1.0+black*0.8+white*0.2 or even different? – Matthias Pospiech Nov 15 '11 at 13:36
up vote 15 down vote accepted

That are different colors, but cannot be seen! 20% of black is less than light gray! Compare it with a 40% of black! The values for the cmyk color can easily be seen in the pdf output when using \pdfcompresslevel=0.

The colors are calculated as:

enter image description here





\color[cmyk]{1, 0.7, 0, 0}\rule{1cm}{1cm} 
\color[cmyk]{0.2, 0.14, 0, 0}\rule{1cm}{1cm}
\color[cmyk]{0.16, 0.112, 0, 0.04}\rule{1cm}{1cm}



enter image description here

share|improve this answer
It is correct that they are not equal, but they are so close that the eye can not distinguish between them. Unfortunately this does not tell me how to get darker colors using colormixing with xcolor. – Matthias Pospiech Nov 15 '11 at 13:34
from which document are these formulas? i can not find them within the xcolor package. I understand how red!75 is calculated with eqn (1), but the calculation of red!75!blue!100 does not seems to be relatd to eqn (1). At least something in the calculation was left out, since eqn (1) does not mention how more than one color is combined. – Matthias Pospiech Nov 16 '11 at 9:10
(1) is a loop, as already mentioned ... and it is my text from my book ... :-) – Herbert Nov 16 '11 at 10:59

For darker color try \colorlet{DarkBlue}{BlueLUH!80!black} instead. This way it will be Blue*0.8 + black*0.2.

If you add second number then third color (i.e. white) will be added, and you don't need that.
As I understand it, BlueLUH!80!black!30 would be (Blue*0.8 + black*0.2)*0.3 + white*0.7

Please see http://en.wikibooks.org/wiki/LaTeX/Colors#Examples

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.