I need to be able to track inventory by some products attributes.

For example I sell shirt type A in red, blue and green. Can I set inventory for the quantities I have in red, blue and green separately? So, one product with three options - tracking the inventory for all three colors separately.

Can it do this?

Thanks for any help.