May not be what you need but at some point I was working on a circular progress bar with multiple colours and dug this out from an abandoned material:
You can discard the radial bit. It kind of does what you need but not really ![]()
Fetch the nodes here:
Afair it was supposed to blend 3 colours but I honestly can’t recall whether it worked the way I wanted it to. Ignore if this turns out to be useless. Perhaps it can push you in the right direction, though…

