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.

1

1 Answer 1

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}
3
  • Thank you very much! And I if want to change the color of the text in the arcarrow object, say, from black to white?
    – Dimitris
    Commented Apr 27, 2019 at 12:30
  • I found it! It was not difficult at all! Thanks again.
    – Dimitris
    Commented Apr 27, 2019 at 12:52
  • @Dimitris Great. The tikz manual is pretty readable...the only problem is that it's so bloody long:)
    – user30471
    Commented Apr 27, 2019 at 12:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .