How to randomize wave texture color?

Hey, how to randomize wave texture color? I want that each wave line would be random color and picked from color ramp?


It can be done like this but not effective way.

The wave texture node does not expose the distorted x-coordinate, which you would need to determine the current band. But you can recreate the wave texture with just this output, getting something like this:


wave_texture_color_bands.blend (122.6 KB)