Dying hair does not effect the milk for breast feeding because the chemicals are not strong enough to enter the skin on top of the head. It is still safe to dye hair and will not effect the baby.
Always remember that whatever you put into or on your body, your baby is receiving the same. I would wait until the child is out of the breastfeeding stage before trying any chemical treatments.
Some of the dyes can penetrate into the bloodstream and expressed with breast milk. Hair may also be a bit fragile while breastfeeding and dying may lead to hair breakage.