Yes, you can dye clothes in a washing machine. Use a dye specifically made for machine dyeing and follow the instructions carefully. Run an empty cycle with hot water and bleach after dyeing to clean the washing machine.