[Tex/LaTex] Draw a progress circle around text

circlestikz-pgf

I would like to draw a circle with a border containing two colors. One color should be the base color and the second color should fill up the border up to a certain percentage. For now I am only having this piece of code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
        \node[shape=circle,draw,inner sep=2pt, thick] (char) {#1};}}
\begin{document}
\circled{85\%}
\end{document}

Which draws a circle around the text:

enter image description here

What I want to achieve is this:

progress

Best Answer

\documentclass{standalone}
\usepackage{tikz}
\usepackage{calc}
\newlength{\outerradius}
\newlength{\innerradius}
\setlength{\outerradius}{2cm}
\setlength{\innerradius}{1.5cm}

\newcommand{\progresscircle}[1]{
  \begin{tikzpicture}
    \fill[black!50] (0,0) circle (\outerradius);
    \fill[violet!70] (0,0) -- (0, \outerradius)
      arc (90:90-3.6*#1:\outerradius) -- (0,0);
    \fill[white] (0,0) circle (\innerradius);
    \node (0,0) {\Huge\sffamily #1\%};
  \end{tikzpicture}
}

\begin{document}
\progresscircle{85.34}

\progresscircle{41.57}
\end{document}

produces

progress circle