Take the 2-minute tour ×
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.
    \documentclass[dvipsnames]{article}
    \usepackage{xcolor}
    \begin{document}
    {\color{Blue}\bf Blue} versus {\color{blue}\bf blue}.
    \end{document}

alt text

Why does one of them differ from the other one?


EDIT 1

  1. I still wonder why the color is distinguished by capitalization :-)
  2. Why did the package author choose dvipsnames as the option name? I think this name potentially makes us obtain a wrong impression from it that is usually used to describe the driver? In fact both pdflatex and latex can use it, right?
share|improve this question
2  
Again: It is the consensus on this site that the latex tags should generally be avoided. –  Caramdir Dec 2 '10 at 6:23
    
Thank you. I will remember this. –  xport Dec 2 '10 at 6:58
1  
are really you a conforming implementation? If not, you probably shouldn't be using that name... –  SamB Jan 26 '11 at 0:23
    
Because the programmers are neither typographers, nor printers. Both Blue vs. blue and dvipsnames are arbitrary (wrong) choices without any practical reason. However, this isn't TeX but color science... Nobody prints in RGB, and there is no such a thing as colors "more fit for human consumption". There is Pantone in printing, etc... –  Karl Karlsson Jun 15 '11 at 17:46

2 Answers 2

up vote 16 down vote accepted

blue is a rgb color and Blue is defined as a cmyk color and handled by a different driver for your output. If you want to be sure, that you use the same driver, then specify one:

\documentclass[dvipsnames]{article}
\usepackage[rgb]{xcolor}

\begin{document}

{\color{Blue}\bf Blue} versus {\color{blue}\bf blue}.

\end{document}

instead of [rgb] you can also use [cmyk]

share|improve this answer
    
thanks for informing the options [rgb] and [cmyk] that I always ignore. –  xport Dec 23 '10 at 11:10

Because that's how the colours are defined :)

Colour names are case sensitive, and red, green, blue are the ‘standard’ (1,0,0), (0,1,0), (0,0,1) RGB colours respectively.

In section 4 of the xcolor manual (pg. 38 for v2.11) the list of other colour names is given; under the dvipsnames section you can see that there are many more colours defined with initial-uppercase names. Personally, I find those Red, Blue, and (especially) Green colours to be much more attractive as they are a little more muted.

share|improve this answer
    
@Will, thank you very much. The package author did it intentionally, the colors depend on the letter case? :D –  xport Dec 2 '10 at 7:07
5  
@xport: Yes, color names are case-sensitive, just like most TeX names. The lower-case ones are the "primary" screen colors (not defined by xcolor) while the capitalized ones are, as Will said, the ones more fit for human consumption. –  Matthew Leingang Dec 2 '10 at 10:21
    
@Matthew, but it looks so funny---Theoritically each color has a specific wavelength, so its name should be unique regardless of the capitalization I think :D –  xport Dec 2 '10 at 11:31
6  
@xport: Yes, but while each color has a specific wavelength, each color does not have a specific name. –  Matthew Leingang Dec 2 '10 at 13:24
    
@Matthew, the current mapping has no inverse. :D Thank you. Closed. –  xport Dec 2 '10 at 14:47

Your Answer

 
discard

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.