
¿Por qué \shadedraw
cambia el color cian y qué puedo hacer para tener el mismo color al usarlo \shadedraw
?
\documentclass[tikz]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc, shapes.arrows}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\def\ccolor{cyan}
\begin{tikzpicture}
\draw[fill=\ccolor] (0,0) rectangle ++(2,3);
\shadedraw[top color=\ccolor, bottom color=white, draw=black] (3,0) rectangle ++(2,3);
\end{tikzpicture}
\end{document}
da:
¡Gracias!
Respuesta1
Puedes definir el tuyo cyan
como quieras
\documentclass[tikz, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
\definecolor{cyan}{RGB}{0, 255, 255}
\draw[fill=cyan] (0,0) rectangle ++(2,3);
\shadedraw[top color=cyan, bottom color=white, draw=black] (3,0) rectangle ++(2,3);
\end{tikzpicture}
\end{document}
o puede utilizar el modelo de color RGB en todo el documento
\documentclass[tikz, rgb, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[fill=cyan] (0,0) rectangle ++(2,3);
\shadedraw[top color=cyan, bottom color=white, draw=black] (3,0) rectangle ++(2,3);
\end{tikzpicture}
\end{document}
-o el modelo CMYK\documentclass[tikz, cmyk, border=1cm]{standalone}