I want to create a chain that alternates between two colors every x chain link.
This is what I want to model:
[![Chain with alternating color chain links](https://i.stack.imgur.com/IyZTw.jpg)](https://i.stack.imgur.com/IyZTw.jpg)

The best I could do was use the wave texture node, but then I get chain links that are half orange half black:
[![Using wave node to create alternating color](https://i.stack.imgur.com/cyiVT.jpg)](https://i.stack.imgur.com/cyiVT.jpg)

Of course, I could just apply the array modifier and change the texture of every x set of chain links, but I want to have the option of later varying the chain length.

Thanks!