7

I have a self defined color:

\definecolor{my-blue}{cmyk}{0.80, 0.13, 0.14, 0.04, 1.00}

I want to use it for a tcolorbox environment:

\begin{tcolorbox}[colback = \color{my-blue}]
stuff
\end{tcolorbox}

however I am just getting mostly unnamed errors (literally ''!'') and the occasional color protected...

2
  • As far as I know, cmyk wants four numbers, not five.
    – egreg
    Commented Dec 3, 2016 at 17:41
  • A fifth number can specify the alpha
    – SumNeuron
    Commented Dec 3, 2016 at 18:01

1 Answer 1

14

The value of the colback option is the name of the color, not the \color command.

\documentclass{article}
\usepackage{tcolorbox}
\definecolor{my-blue}{cmyk}{0.80, 0.13, 0.14, 0.04, 1.00}
\begin{document}
\begin{tcolorbox}[colback = my-blue]
stuff
\end{tcolorbox}
\end{document}

enter image description here

1
  • I tired just using my-blue but it gave errors, hence trying \color{my-blue}
    – SumNeuron
    Commented Dec 3, 2016 at 18:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .