I am not suggesting this is the definitive way to do it, but it works for me.
The key is in the planning.
If you plan well, it can save a lot of work later.
Based on my earlier example, you could have your prices stored in your size table, but a more flexible approach is to have a price table.
For size based pricing, your table would be something like this
PriceID ProductID SizeID Price
1 1 1 10
2 1 2 12
For size and colour based pricing, you would need add a colour table, similar to your size table. In this instance, your price table could look like this...
PriceID(PK) ProductID SizeID ColourID Price
1 1 1 1 10
2 1 1 2 12
3 1 2 1 10
4 1 2 2 13
For each additional option, you would need to add an option table to your database, with productID and optionID, and an extra column to the price table.
This means more work in setting up, but more flexibility.
So if you wanted, for example, to have xxl t shirts at a price different to other size t shirts, you could do this with size based pricing.
If you wanted to put red xxl t shirts at a price different to other size and colour t shirts, you could do this with size and colour based pricing.
Being practical, 2 or 3 options is probably as complicated as you need.
All of the above also involves a bit more php coding, but the database principles outlined above (i hope) are sound.