By it’s very nature hair dye is a difficult stain to deal with. Speed is of the essence if you are successfully going to remove this stain. I will look at washable fabric, dry clean only and finally your carpets and upholstery
Washable fabric
Immediately immerse the item in cold water and leave to soak to allow the dye to run out of the item. Then rub the stain with neat washing up liquid / dish detergent and then sponge with clean cold water. If any stain remains then the item can be soaked overnight in warm water containing a biological detergent. Then wash as normal
Dry clean only fabric
As soon as possible rub neat washing up liquid / dish detergent into the stain. Then carefully rinse with as little water as possible. If the stain persists then dry clean.
Carpets and upholstery
As soon as possible dab with cold water to moisten the area. Then rub neat washing up liquid / dish detergent into stain, and then sponge off with warm water. If stain persists carefully treat with a stain remover, then shampoo if necessary.