Smartdiagram 包:附加功能中的不同填充颜色

Smartdiagram 包:附加功能中的不同填充颜色

我正在使用智能图表包来绘制图表,并且我正在使用附加功能。

我想对每个附加内容使用不同的填充颜色,但到目前为止我还不知道这是否可行。

这是我的 MWE,其中所有附加内容都填充了gray!20

\documentclass{article}
\usepackage{tikz}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions} 

\begin{document}

\centering
\smartdiagramset{
    set color list={red!10, red!30,red!50},
    sequence item border color=black,
    sequence item text color=black,
    sequence item border size=1.2\pgflinewidth,
    sequence item font size=\scriptsize\sffamily,
    additions={
        additional item shape=rectangle,
        additional item fill color=gray!20,
        additional item border color=black,
        additional arrow line width=2pt,
        additional arrow tip=to,
        additional arrow color=black,
        additional item font=\scriptsize\sffamily,
      }
}
\smartdiagramadd[sequence diagram]{step 1,step 2, step 3}
{above of sequence-item1/input,below of sequence-item2/output 1,below of sequence-item3/output 2}
\smartdiagramconnect{to-}{sequence-item1/additional-module1}
\smartdiagramconnect{-to}{sequence-item2/additional-module2}
\smartdiagramconnect{-to}{sequence-item3/additional-module3}

\end{document}

在此处输入图片描述

有没有办法对注释“输入”、“输出 1”和“输出 2”使用不同的填充颜色?

答案1

您可以colorseries直接使用。例如:

\documentclass{article}
\usepackage[rgb]{xcolor}
\usepackage{tikz}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}
% xcolor manual: 34
\definecolorseries{colours}{hsb}{grad}[hsb]{.575,1,1}{.987,-.234,0}
\resetcolorseries[12]{colours}

\begin{document}

\centering
\smartdiagramset{
    set color list={red!10, red!30,red!50},
    sequence item border color=black,
    sequence item text color=black,
    sequence item border size=1.2\pgflinewidth,
    sequence item font size=\scriptsize\sffamily,
    additions={
        additional item shape=rectangle,
        additional item fill color=colours!!+!20,
        additional item border color=colours!!,
        additional arrow line width=2pt,
        additional arrow tip=to,
        additional arrow color=black,
        additional item font=\scriptsize\sffamily,
      }
}
\smartdiagramadd[sequence diagram]{step 1,step 2, step 3}
{above of sequence-item1/input,below of sequence-item2/output 1,below of sequence-item3/output 2}
\smartdiagramconnect{to-}{sequence-item1/additional-module1}
\smartdiagramconnect{-to}{sequence-item2/additional-module2}
\smartdiagramconnect{-to}{sequence-item3/additional-module3}

\end{document}

附加模块的颜色系列

相关内容