This is for a Stack Overflow question about using colour swatches in a Shopify theme. It extends the code provided in this tutorial on the Shopify wiki to grey out the unavailable colours (not available or sold out) when a size is selected by a customer.
Stack Overflow question: How can I create “smarter” swatches for a shopify theme
Shopify tutorial: Add color swatches to your products