This question came up to me because I didn't want to define a new color in my LaTeX project.
I want to use a very specific color in my tikz drawing. Using Microsoft Paint's Color Picker tool, I get the following information about it:
The values I obtained with the tool are shown in the right window inside the screenshot, reading
Hue: 205
Saturation: 67
Lum(?) 123
Red: 165
Green: 96
Blue: 157
So I went over to TeX to try xcolor
's color specification:
\documentclass[border=1pt]{standalone}
\usepackage{xcolor}
\begin{document}
\texttt{red!64.7!green!37.64!blue!61.56!} \hfill \fcolorbox{black}{red!64.7!green!37.64!blue!61.56!}{\hspace{2mm}}
\end{document}
(the red color is 165/255=64.7% so this the value I gave to red
, same for green and blue).
Looks close, doesn't it?
So I headed over again to Windows Paint to see if color picker gives the same color, as in the first pick, and it turns out that no:
Hue: 169
Saturation: 95
Lum(brightness?) 148
Red: 136
Green: 119
Blue: 196
If I am not wrong, one can specifty a color using the rgb model, or the hue, saturation,brightness model. Both differ in the cross check I made.
How can I get exactly the same color?