Is it possible to set a "global" stock for each attribute?

Let's say I have 3 main products (Napkins).

All 3 main products have 3 attributes (smaller napkins).

To sell more, I want to make packages of napkins.
Main napkin + smaller napkin

So the main products:
Napkin Red
Napkin Blue
Napkin Green

can all be ordered with the same attributes:
Smaller Napkin - Yellow
Smaller Napkin - Purple
Smaller Napkin - Black

My Problem:
When someone order main Red Napkins, with Smaller Yellow Napkins as an attribute. I want the "Smaller Yellow Napkin" to be subtracted in stock on all the main products having the Yellow-Napkin attribute.

Did anyone understand this?
And is it possible?

Anyways - thanks for a great mod! It works perfectly well on my other products, having separate attributes..