smartdiagram: How to remove gradient from background color?

The answer proposed by @Christian Hupfer works great but is limited to one color. In the source code of the smartdiagram package, the current color is referenced as \col. Hence, the following code allows the use the set color list parameter:

\tikzset{module/.append style={top color=\col,bottom color=\col}}

The resulting code creates a diagram without gradient inside the nodes but with the chosen colors as @L42 requested.

diagram without color gradient


\documentclass{article}
\usepackage{smartdiagram}
\begin{document}


\tikzset{
  every shadow/.style={
    fill=none,
    shadow xshift=0pt,
    shadow yshift=0pt}
}
\tikzset{module/.append style={top color=\col,bottom color=\col}}

\smartdiagramset{
  module shape=rectangle,
  uniform arrow color=true,
  set color list={red!10, blue!30, blue!30, blue!30, green!40},
  arrow color=gray!50!black,
  back arrow distance=0.75cm,
  module y sep=2cm,
  module minimum width=4cm,
  text width=4cm,
  border color=none,
}
\smartdiagram[flow diagram]{
  a,
  b,
  c,
  d,
  e
}

\end{document}

One way is to use the module./style= option, but appending the top color and bottom color to have the same value.

The backdraw is that you've have to specify again the colors.

\documentclass{article}
\usepackage{smartdiagram}
\begin{document}


\tikzset{
  every shadow/.style={
    fill=none,
    shadow xshift=0pt,
    shadow yshift=0pt}
}

\tikzset{module/.append style={top color=teal!60,bottom color=teal!60}}
\smartdiagramset{
  module shape=rectangle,
  uniform arrow color=true,
  uniform color list=teal!60 for 5 items,
  arrow color=gray!50!black,
  back arrow distance=0.75cm,
  module y sep=2cm,
  module minimum width=4cm,
  text width=4cm,
  border color=none,
}
\smartdiagram[flow diagram]{
  a,
  b,
  c,
  d,
  e
}

\end{document}

Tags:

Smartdiagram