Help with setting up this option if even possible (variants/sell limit)?

New Member
1 0 0

Let's say i have a product with 8 variants (ie 8 different colors).  I need all 8 colors with a qty of 1, but only want to sell 4 total.  So once 4 of the 8 colors sell i want to be out of stock. For example i have 4 blank shirts. I can color them in 8 different colors, but only 1 of each color until 4 have been sold total. How would this be set up?