Yes very nice solution, and sets are probably the easiest way to do this (btw if you move to Tableau 9, you can use LoD calculations to make this even easier!)
Here's a good link on how they work and what they do
As I'd just got a solution for you, I thought I'd post it. I took the index() route, and the only thing you were missing (I think) was to 'sort' the index, so it acts as a rank.
If you look at the attached, I've created a Table version, so you can see how it works, and the final solution. One thing that is good with the sets method, is that a set is evaluated at line level (so you can then use the T/F of the set to create your colour formula), whereas with the Table Calc (index in this case) I have to leave the 'Specialty' in the detail of the viz (if you over over my bars, you'll see that I actually have every 'specialty' stacked, but as all but the top 3 are coloured differently you won't see them.
This is why LoDs are so good, they are evaluated at row level, but you can specify the level at why they are aggregated, and you don't need that level in the ViZ
Stacked Bars Top 3 Colour.twbx 20.1 KB
That's really helpful - thank you. The LoD functionality looks great too. I look forward to having a proper look when I upgrade.