I would like to specify pantone colors. spotcolor.sty seems to to the trick when compiled with pdfLaTeX:
\documentclass{article}
\usepackage{color}
% \usepackage{xcolor} % Does not work
\usepackage[pantone]{spotcolor}
\SetPageColorSpace{PANTONE}%
\definecolor{mycolor}{spotcolor}{PANTONE273PC,1.0}%
\begin{document}
{\color{mycolor}\rule{4cm}{3cm}}
\textcolor{mycolor}{Colored text}
\end{document}
but spotcolor
it is incompatible with xcolor
which is loaded by TikZ
. Is it somehow possible to get xcolor
and TikZ
to work together with spotcolor
so I can do something like:
\documentclass{article}
\usepackage{tikz}
\colorlet{mycolor}{blue}
% Does not work
% \usepackage[pantone]{spotcolor}
% \SetPageColorSpace{PANTONE}%
% \definecolor{mycolor}{spotcolor}{PANTONE273PC,1.0}%
\begin{document}
\begin{tikzpicture}
\node[fill=mycolor,minimum width=4cm,minimum height=3cm] (rule) {};
\node[mycolor,anchor=north west] at (rule.south west) {Colored text};
\end{tikzpicture}
\end{document}
Edit:
I can load xcolor
after defining my pantone colors but TikZ
still does not like it:
\documentclass{article}
\usepackage{ltxcmds}
\usepackage{color}
\usepackage[pantone]{spotcolor}
\SetPageColorSpace{PANTONE}%
\definecolor{mycolor}{spotcolor}{PANTONE273PC,1.0}%
\usepackage{xcolor}
% \usepackage{tikz}
\begin{document}
{\color{mycolor}\rule{4cm}{3cm}}
\textcolor{mycolor}{Colored text}
\colorlet{mysecondcolor}{red}
{\color{mysecondcolor}\rule{4cm}{3cm}}
\textcolor{mysecondcolor}{Colored text}
\makeatletter
\ltx@ifpackageloaded{tikz}{%
\begin{tikzpicture}
\node[fill=mycolor,minimum width=4cm,minimum height=3cm] (rule) {};
\node[mycolor,anchor=north west] at (rule.south west) {Colored text};
\end{tikzpicture}}{}
\makeatother
\end{document}