0

I have noticed that if I declare a new color with RGB values using xcolor in a TeX file, and then use the new color to write something, the rendered color is not what I put in. E.g.,

\documentclass{article}
\usepackage{xcolor}
\definecolor{nasablue}{RGB}{11,61,145} % the blue in NASA's logo
\begin{document}
  % render in large font for convenience
  {\color{nasablue}\sffamily\bfseries\fontsize{60}{60}\selectfont Color sample}
\end{document}

No matter what I compile this on (linux, OSX), the text in the rendered PDF has a different RGB value. When I open it up in a viewer and use the color picker to get the RGB value of the text, I get (12,54,134), not what I put in.

In a beamer presentation, this is even worse, and text rendered with this color shows up as (51,51,178). This is awful, and looks purple instead of dark blue. Why does this happen, and how can I correct for this?

TM5
  • 192
  • 3
  • 12
  • I get 11,61,145 : https://i.stack.imgur.com/TAsFV.png Can you show your .log file? – samcarter_is_at_topanswers.xyz Jul 20 '20 at 23:14
  • Can you please also add a [mre] that would allow us to reproduce your beamer problem? Depending on the theme and other elements you use, it might be a problem of the colour space. – samcarter_is_at_topanswers.xyz Jul 20 '20 at 23:15
  • maybe related: https://tex.stackexchange.com/a/367074 – samcarter_is_at_topanswers.xyz Jul 20 '20 at 23:19
  • @samcarter_is_at_topanswers.xyz Huh... if I use texstudio's internal viewer, the color of my MWE does appear to be (11,61,145). However, if I open the same PDF in an external viewer (Skim in this case), I see a slightly different color. In [this screenshot](https://drive.google.com/file/d/1KQ5OSufBb2_Rsig8bEHMqcD5HG5Z3hgE/view?usp=sharing), Skim is to the left, texstudio's internal viewer is to the right, and the color picker loop is on Skim. So perhaps there's something screwed up with Skim's color rendering? – TM5 Jul 21 '20 at 02:55
  • @samcarter_is_at_topanswers.xyz I'm ashamed to say the beamer issue was my mistake. Beamer was in fact using a different color, but it was so close to my desired blue that I thought it was using ```nasablue``` but rendering it incorrectly. I've had this problem on slides with transparencies before, so I jumped to an incorrect conclusion. – TM5 Jul 21 '20 at 03:02
  • I'm wondering if maybe superuser.com would be a good place to ask about the problem with skim – samcarter_is_at_topanswers.xyz Jul 21 '20 at 09:03

0 Answers0