The theory goes that hair relaxers open up the hair cuticle, allowing color to penetrate deeper into the hair shaft for a longer-lasting result. However, both hair relaxants and colors are fairly harsh chemical treatments, both of which can dry out and/or damage the hair, so it is always a good idea to keep hair in good condition with regular treatments and avoiding the overuse of heated tongs, straighteners and blow-dryers.
Hair that is regularly relaxed and/or colored may be more prone to drying, splitting and even falling out than hair which has never undergone a chemical treatment or been regularly given deep-conditioning treatments, so it is probably best to wait for longer, rather than shorter periods in between relaxing and dying hair if it is done regularly.
Furthermore, different chemicals are used in different types of relaxers and dyes, which can result in unforeseen problems if used in combination. It is therefore advisable to seek out the advice of a qualified hairdresser or colorist who can assess the condition of hair and offer guidance on which products combine better and how much time to leave between applications.
Overall though, the general rule of thumb is that one should relax the hair before coloring it because perm lotion will just leech out the color otherwise.
It is also always a good idea to perform an allergy test before using a new hair coloring product, especially home-dyeing kits, as allergic reactions are possible. In all cases, it is also advisable to follow the instructions of the manufacturer closely so as to avoid unwanted results or problems that only a hair salon can rectify.