
\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}