Is there a way to make different tiers of attributes, so that the top-tier attributes determine which lower-tier attributes are displayed?

For instance, if certain colors of T-shirts are only available in certain sizes:

** Large available in Red, Yellow & Blue

** Medium available in Red & Yellow

** Small available in Red

then choosing the size (top-tier) changes the displayed available colors (lower-tier).

* * * * * *

Product: T-shirt

Top-tier attribute: Size

Lower-tier attribute: Color

* * * * * *


Thanks in advance!

(side note: I'm not selling shirts, but the concept is the same and I have far too many products & options to enter each combination as an individual product)