If hair is in great condition, it is possible to dye hair right after a perm is done. However, waiting for a week or two is better. Both processes are hard on hair, and one right after the other can damage hair or even cause hair loss.
It's not recommended to do at-home perm and dye jobs. Dying hair before perming it can cause chemical reactions that will ruin the color. Dying hair after perming it can lead to split ends and hair that's coarse to the touch. A professional will be able to look at hair and know if it's safe to proceed with dye.