The best rule is wearing a purple suit instead. It is sad truth but it really is the best thing you can do at a wedding, wear a suit. Cotton pants or chinos wear them with a purple blazer and a dress shirt and tie. It's always better to be a little overdressed, especially at occasions like this, then under dressed.