In fact, each time a new color is selected, Cesium adds another polyline with the selected color in the same position, instead of just changing the color. Hence, a mixed color is shown for all polylines with except for the last one in the script (Y-Axis in my example attached).
Attached, you may find a piece of my code that you can try. After you change once or twice the color, you will clearly see different colors between the two polylines.
Please let me know if this a Cesium bug, or I could achieve the dynamically colors change in a different way.
Thanks for your time,
Cesium Version: 1.29
Windows 10, Firefox 50.1.0, node.js 7.2.1 (x64) and npm
test.html (2.76 KB)