To illustrate what edge-coloring is, I'd like to colorize a regular polygon. I want to generate the shape using TikZ, then colorize the sides (edges) of the polygon separately, for instance by doing something like this:
\draw[red] (polygon.side 1);
Unfortunately, the world does not seem to work like this. For now my ugly workaround is to overdraw using dotted, dashed, and thick lines.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,positioning}
\begin{document}
\begin{tikzpicture}
\node[draw, dotted, minimum size=2cm, regular polygon,
regular polygon sides=5] (polygon) {};
\draw[thick] (polygon.corner 1) -- (polygon.corner 2);
\draw[dashed] (polygon.corner 2) -- (polygon.corner 3);
\draw[thick] (polygon.corner 4) -- (polygon.corner 5);
\draw[dashed] (polygon.corner 5) -- (polygon.corner 1);
\end{tikzpicture}
\end{document}
Thanks!