A solution based on this answer. This answer comes with an Outline
style, which has one argument, the distance from the center to the line to the contour. The width is then twice this length.
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{decorations}
% based on https://tex.stackexchange.com/a/103088/121799
\def\pgfdecoratedcontourdistance{0pt}
\pgfkeys{/pgf/decoration/contour distance/.code={%
\pgfmathparse{#1}%
\let\pgfdecoratedcontourdistance=\pgfmathresult},%
/pgf/decoration/contour name/.store in=\ContourName,
/pgf/decoration/contour name=mycontour
}
\pgfdeclaredecoration{contour lineto}{start}
{
\state{start}[next state=draw, width=0pt]{
\pgfcoordinate{\ContourName-0}{\pgfpoint{0pt}{\pgfdecoratedcontourdistance}}
\pgfpathlineto{\pgfpoint{0pt}{\pgfdecoratedcontourdistance}}%
}
\state{draw}[next state=draw, width=\pgfdecoratedinputsegmentlength]{
\pgfmathparse{-\pgfdecoratedcontourdistance*cot(-\pgfdecoratedangletonextinputsegment/2+90)}%
\let\shorten=\pgfmathresult%
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength+\shorten}{\pgfdecoratedcontourdistance}}%
%\stepcounter{Outline}
\pgfcoordinate{\ContourName-1}{\pgfpoint{\pgfdecoratedinputsegmentlength+\shorten}{\pgfdecoratedcontourdistance}}
}
\state{final}{
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength}{\pgfdecoratedcontourdistance}}%
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength}{0pt}}
}
}
\tikzset{Outline/.style={ postaction={
decoration={contour lineto, contour distance=-#1,contour name=mycontourA},draw=blue,
decorate},
postaction={
decoration={contour lineto, contour distance=#1,contour name=mycontourB},draw=blue,
decorate},}}
\begin{document}
\begin{tikzpicture}
\draw[red,line width=10pt](0,0)--(90:1.5)--(60:2.5)--(30:3.0);
\path[blue,very thick,Outline=5pt](0,0)--(90:1.5)--(60:2.5)--(30:3.0);
\begin{scope}[xshift=4cm]
\path[blue,line width=2pt,Outline=5pt](0,0)--(90:1.5)--(60:2.5)--(30:3.0);
\end{scope}
\begin{scope}[xshift=8cm,scale=2]
\path[blue,line width=4pt,Outline=10pt](0,0)--(90:1.5)--(60:2.5)--(30:3.0);
\end{scope}
\end{tikzpicture}
\end{document}

NOTE: This works only with polygons which are not closed.
8pt
inside,\draw[white, line width=8pt,shorten >=1pt,shorten <=1pt](0,0)--(90:1.5)--(60:2.5)--(30:3.0);
[double]
which does what @SalimBou proposes, it draws the path twice with two different thicknesses. However, it does not close the path ends. For that, you would have to construct a secondary path, along the lines of($0+5pt$,0) --
(with calc library). If there is a way to automate that, I am unaware of it.preaction
(orpostaction
) rather than usingdouble
.