# colorspace won't change colors in beamer

So I'm trying to do a spotcolor define in a beamer document and for some reason I'm getting a problem. Whenever I try and do more than one color, only one color shows up. For example the following MWE:

\documentclass{beamer}
\RequirePackage[scale=1.24]{beamerposter}
\RequirePackage{colorspace}

\definespotcolor{foo}{BarTone 555 GN}{.8,.2,.5,.3}
\definespotcolor{boo}{Random}{.8,.5,.2,.3}

\begin{document}
\color{foo}Green
\color{boo}Blue
\end{document}


When I do this, both "Blue" and "Green" show up as green. I even tried putting braces around them: {\color{foo}Green} but that didn't stop the problem from occuring. Any thoughts on this?

Here's some system info:

xxx:~ $tlmgr info colorspace package: colorspace category: Package shortdesc: Provides PDF color spaces longdesc: The package provides PDF color spaces. Currently, only spot colors and overprinting are supported. It requires xcolor, and supports pdfTeX and LuaTeX. installed: Yes revision: 50585 sizes: doc: 141k, run: 25k relocatable: No cat-version: 1.3 cat-license: mit cat-topics: colour cat-contact-home: http://www.texnia.com/ cat-contact-repository: https://github.com/jbezos/colorspace collection: collection-latexextra xxx:~$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020)


It looks like a colorspace bug. It defines a command globally and with beamer (which handles color differently than with xcolor alone) this breaks.

\documentclass{beamer}
\RequirePackage[scale=1.24]{beamerposter}
\RequirePackage{colorspace}

\definespotcolor{foo}{BarTone 555 GN}{.8,.2,.5,.3}
\definespotcolor{boo}{Random}{.8,.5,.2,.3}

\makeatletter
\def\spc@getref#1 #2\@@{\def\spc@ir{#1}} %changed \gdef to def
\makeatother

\begin{document}
\color{foo}Green
\color{boo}Blue
\end{document}

• This kind of works, but then throws problems with tikz ._. Is there a way to make it work with tikz as well? Example of something that fails: \begin{tikzpicture}[gr/.style={color=foo}] \draw[gr] (0,0) -- (1,0); \end{tikzpicture} (This is kind of a different issue now, so if you want I can create another question so that I can accept this one, since this does technically fix the above problem. – Aram Papazian Jul 6 at 17:27
• well it could be that my fix is wrong (the colorspace code isn't the easiest and it has to go through some loops to hook into xcolor), but better make another question anyway with an example. – Ulrike Fischer Jul 6 at 17:33
• It looks like it's a different issue anyway, so that makes sense. Thanks. – Aram Papazian Jul 6 at 17:50
• Here's a link to the new question if you want to check it out: tex.stackexchange.com/questions/552508/… – Aram Papazian Jul 6 at 17:57