The trick is to snip the original filament at a 90 degree angle, and feed in differently colored filament right after it. With a direct-drive extruder, it's simple to create this technique because the second snippet of filament is immediately grabbed by the toothed bolt.
You can snip the filament directly at the beginning of the cold end of the direct-drive extruder, or you can snip it a bit ahead to plan on inserting filament at a later point.
One of the main things to keep track of is that the filament switches about 170 mm after the beginning of the cold end of the extruder. It takes about 100 mm of filament for the new color to move down from the top of the cold end to the bottom of the hot end, and then it takes another 70 mm for the filaments to change colors completely.
This method opens all sorts of interesting possibilities. Currently, there is a gradient of color between the different filaments, but it would be theoretically possible to create a sharp change. You could switch filaments, output 170 mm of filament into a different part after the original print, then return to the original part and create more features in a new color.
You could even transition types of filaments, not just colors... you could go from ABS to PLA, or ABS to NinjaFlex... A gradient transition of ABS to NinjaFlex would probably create a stronger bending area between a hard and soft element, as the flexing part would be better integrated into the main product.
Another shot of the clipped filament. Of course, you could clip it lower down, right at the top of the extruder.
Here is a closeup of the finished print (the ubiquitous CuteOcto design, at 23% scale). The filament started off blue, changed to orange, and then was in the process of changing to blue again at the end.
The blue remained at steel gray at the top for quite a while, while the bottom had a relatively short transition from blue to orange. This was probably due to the fact that the base has a larger amount of surface area per layer, depositing a longer amount of filament for each layer. This means that the transition would have happened more quickly.
Just for giggles, here is one of my early attempts at color changes. I tried melting the ends of the two filament strands together... they wouldn't hold tightly enough. That's just part of the experimental process, though!
Stay tuned for another post next Friday!