Use inkjet cartridge to color filiment?
I don't think it makes a lot of sense - you don't need that kind of resolution, and getting a sufficient amount of ink that way to coat the filament would be hard. If you're going to be switching colors rapidly, you'd need a long purge between colors anyway. I also doubt the type of ink is suitable for sticking to filament materials.
If you really want an automated filament coloring system, I would do it with Sharpies and actuators to move individual ones on/off of the filament as it passes through. Coloring PLA with Sharpies prior to printing is a known-working technique, and there are even models available on Thingiverse for holders to keep them in place while the filament runs through. Designing the actuators to switch individual ones on/off, and the firmware controls for them, would be the natural next step.
Here are some examples I did with manual coloring of natural translucent PLA (from left to right: uncolored, silver Sharpie, and red Sharpie):

I didn't color a long enough segment of filament or properly purge for any of them, which is why the coloring is inconsistent/incomplete. But the technique definitely works.