1

This code is from @marmot's reply here : Modifying arcarrow

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{decorations.text}
\definecolor{mygray}{RGB}{208,208,208}
\definecolor{mymagenta}{RGB}{226,0,116}
\newcommand*{\mytextstyle}{\sffamily\Large\bfseries\color{black!85}}
\begin{document}
\begin{tikzpicture}
   \fill[mymagenta] circle (1.35);
   \node at (0,0) [
      font  = \mytextstyle,
      color = white,
      align = center
   ]{
      PDCA\\
      Cycle
   };
   \pgfmathsetmacro{\mydist}{2}
   \pgfmathsetmacro{\Radius}{2}
    \foreach \X [count=\Y] in {PLAN,DO,CHECK,ACT}
    {\pgfmathtruncatemacro{\itest}{sign(sin(180-\mydist-90*\Y))}
    \ifnum\itest>0
    \draw[mygray,line width=1cm,postaction={decoration = {
         text along path,
         text = {|\mytextstyle|\X},
         text align = {align = center},
         raise = -1.0ex
      },
      decorate}] (180-\mydist-90*\Y:\Radius) arc(180-\mydist-90*\Y:90+\mydist-90*\Y:\Radius);
    \else
    \draw[mygray,line width=1cm,postaction={decoration = {
         text along path,
         text = {|\mytextstyle|\X},
         text align = {align = center},
         raise = -1.0ex
      },
      decorate}] (90+\mydist-90*\Y:\Radius) arc(90+\mydist-90*\Y:180-\mydist-90*\Y:\Radius);
    \fi  
      } 
\end{tikzpicture}
\end{document}

Is is possible to have each arcarrow object with a different color? Thank you very much.

Dimitris
  • 1,405

1 Answers1

1

The colours come from the draw command and, in particular, from the use of the colour mygray. All that you need to do is change them. For example, you can use a different colour for each by adding a colour to the \foreach loop:

enter image description here

Here is an update of marmot's nice code:

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{decorations.text}
\definecolor{mygray}{RGB}{208,208,208}
\definecolor{mymagenta}{RGB}{226,0,116}
\newcommand*{\mytextstyle}{\sffamily\Large\bfseries\color{black!85}}
\begin{document}
\begin{tikzpicture}
   \fill[mymagenta] circle (1.35);
   \node at (0,0) [
      font  = \mytextstyle,
      color = white,
      align = center
   ]{
      PDCA\\
      Cycle
   };
   \pgfmathsetmacro{\mydist}{2}
   \pgfmathsetmacro{\Radius}{2}
    \foreach \X/\col [count=\Y] in {PLAN/blue!10,DO/red!10,CHECK/green!10,ACT/orange!10}
    {\pgfmathtruncatemacro{\itest}{sign(sin(180-\mydist-90*\Y))}
    \ifnum\itest>0
    \draw[\col,line width=1cm,postaction={decoration = {
         text along path,
         text = {|\mytextstyle|\X},
         text align = {align = center},
         raise = -1.0ex
      },
      decorate}] (180-\mydist-90*\Y:\Radius) arc(180-\mydist-90*\Y:90+\mydist-90*\Y:\Radius);
    \else
    \draw[\col,line width=1cm,postaction={decoration = {
         text along path,
         text = {|\mytextstyle|\X},
         text align = {align = center},
         raise = -1.0ex
      },
      decorate}] (90+\mydist-90*\Y:\Radius) arc(90+\mydist-90*\Y:180-\mydist-90*\Y:\Radius);
    \fi
      }
\end{tikzpicture}
\end{document}