# Draw a shaded wheel in Tikz

I want to draw a shaded wheel using Tikz

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\shade[outer color=gray,middle color=gray!10,inner color=gray] [even odd rule] (0,0) circle (1.5) (0,0) circle (1);
\end{tikzpicture}
\end{document}


The middle color wont work ?

To get a precise radial shading, you must take into account the following extract and the pictures from p.1086 of pgfmanual (v3.0.1a):

The shading is scaled and translated such that the point (50bp, 50bp), which is the middle of the shading, is at the middle of the path and such that the point (25bp, 25bp) is at the lower left corner of the path and that (75bp, 75bp) is at upper right corner.

\documentclass{standalone}
\usepackage{tikz}

{
color(0bp)=(gray);
color(16.66666bp)=(gray); % = 1/1.5 * 25bp
color(20.83333bp)=(gray!10); % = 1.25/1.5 * 25bp
color(25bp)=(gray);
color(50bp)=(gray)
}

\begin{document}
\begin{tikzpicture}
(0,0) circle (1.5) circle(1);
\end{tikzpicture}
\end{document}


You can define a new shading, e.g., \pgfdeclareradialshading{ring}, like this:

\documentclass[tikz, border=5pt]{standalone}

{rgb(0cm)=(1,1,1);
rgb(.6666cm)=(.6,.5,.5);
rgb(1cm)=(1,1,1)}

\begin{document}
\begin{tikzpicture}
\draw[shading=ring, even odd rule] (0,0) circle (1.5) circle (1);
\end{tikzpicture}
\end{document}

\end{document}


Just add a draw command for the inner circle:

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\shade[outer color=gray,middle color=red,inner color=gray] [even odd rule] (0,0) circle (1.5) (0,0) circle (1);
\end{tikzpicture}
\end{document}


I have added draw=gray so that the colour of the border to the inner circle matches the shaded region.

EDIT

I suspect that this is ot what you want, but the middle color is being overridden by the inner color=gray thar follows it. You need to put middle color last in order for it to work. The code:

\documentclass[border=2mm]{standalone}
\usepackage{tikz}