You can set background to only one color but you can make a list of colors and when edge reached pick a different color or assing a different color to different edges
First case
Second case