I'm trying to use the wave color model in a tikz picture using the document class article. When I do, I get the error message "Unsupported color model 'hsb'". Consider the code below.
\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}
\definecolor{MyColor}{wave}{500}
\begin{document}
\textcolor{MyColor}{Hello}
\begin{tikzpicture}
\node[fill=MyColor, circle](1) at (0,0){};
\node[fill=red, circle](2) at (2,0){};
\node[fill={rgb:red,1;green,0;blue,1}, circle](3) at (4,0){};
\end{tikzpicture}
\end{document}
This produces
with the error message written above. Notice that the defined color MyColor works fine in text, but not in tikz. Also notice that tikz does support the rgb color model.
If I change the document class to beamer, with the option xcolor={rgb}, then I get
If I try to add the option xcolor={rgb} to the document class article, the code won't compile.
Is there a work-around to being able to use the wave color model inside of a tikz picture using the article document class?
Best Answer
Using the
rgb
option as package option toxcolor
:or, passing it as a global option, to be picked up by
xcolor
, as inseem to work both in
beamer
and inarticle
. A little example: