I've wanted to do that a number of times, typically so I can light a character in comp without affecting the lines.
In the past, I've had to make a reference of the rig with different styles applied, and then use Layer Comps to make a separate 'Fills Mask' pass, and maybe a 'Strokes Only' pass.
If you're using After Effects with Moho, a trick that may work even better is to render your Moho animation with NO anti-aliasing. Then, download and install the free OLM plugins for After Effects found here:
OLM Digital R&D. The plugins (notably the 'Keep' plugins) give you a number of ways to select the present colors and strokes and create new masks within AE, and they work best when there is no anti-aliasing in the renders. Then, after you've finished with your selections and processes, you add OLM Smoother to apply your antialiasing.
This is a fairly common 2D workflow used in TV animation production. I've used it with Harmony render passes to AE, and it should work fine with Moho render passes too. (I've been meaning to use it with Moho renders the next time I needed this kind of masking.)