This is quite simple really but I hadn't figured it out until now.
this is a red-->yellow and green-->blue gradient within another gradient. I picked garish colors to make the testing easier but you can change the attribute nodes to anything else.
The start and end for each gradient is quite close to make a sudden transition from one color to the next.
The material assumes 15cm from bottom to top of the pattern but once you apply the material to your model you can translate, rotate and scale it to fit any other size or direction.
Click to view attachment
Click to view attachmentClick to view attachment
Update: Here's an ultra nested mat that does seven colors for the full ROY G BIV spectrum
Click to view attachment
Now I can finally make that gay teapot that has eluded me for all these many years.
Click to view attachment
Here's an example of scaling it onto a larger character by varying the scale Y property once the material is on the model. If you use a Shift-Q render-lock box you can watch the material change as you change the property.
Click to view attachment
