In the following MCE, the myred
color is defined thanks to l3color
syntax (\color_set:nnn {myred} {rgb} {1,0,0}
):
\documentclass{article}
\usepackage{tikz}
\usepackage{l3draw}
\begin{document}
\ExplSyntaxOn
\tikz \draw[red] (0,0) circle [radius=10pt];
%
\color_set:nnn {myred} {rgb} {1,0,0}
\color_fill:n { myred }
\draw_begin:
\draw_path_circle:nn {0,0} {10pt}
\draw_path_use_clear:n { draw }
\draw_end:
%
% \tikz \draw[myred] (0,0) circle [radius=10pt];
\ExplSyntaxOff
\end{document}
This color works well e.g. in a l3draw
's drawing but not in a tikz
's drawing, as one can see by uncommenting the instruction \tikz \draw[myred] (0,0) circle [radius=10pt];
, the error being:
! Package pgfkeys Error: I do not know the key '/tikz/myred' and I am going to
ignore it. Perhaps you misspelled it.
Is there a way to make l3color
's colors usable with tikz
?
Best Answer
Colors defined with
\color_set:nnn
are not usable withxcolor
. Minimal exampleThis results in
You can define your own version.