
なぜ\shadedraw
シアン色が変わるのでしょうか。また、 を使用するときに同じ色にするにはどうすればよいのでしょうか\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}
与える:
ありがとう!
答え1
cyan
好きなように定義できます
\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}
または、文書全体でRGBカラーモデルを使用することもできます。
\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}
-またはCMYKモデル\documentclass[tikz, cmyk, border=1cm]{standalone}