Network Graphs with Edge-Specific Coloring

Iā€™d like to plot a network graph (such as the one displayed demoed here https://plot.ly/python/network-graphs/) in a way that I can specify the color of each pairwise edge. How could I do something like this?

Both the Python and R tutorials show a single color for the edges.

@RylanSchaeffer Take a look at this forum discussion https://community.plotly.com/t/network-graph-set-each-edge-with-different-color/2805/2 to find out how to handle edges of different colors.