The Messenger of Allah ﷺ said, "When one of you is standing in prayer, what serves as a barrier in front of him is something the height of the back of a saddle. If there is nothing the height of the back of a saddle in front of him, then his prayer is broken by a woman, a donkey, or a black dog passing in front of him."I asked, "What distinguishes the black dog from the yellow or the red?"He replied, "I asked the Messenger of Allah ﷺ just as you have asked me, and he said, 'The black dog is a devil.'"
أخبرنا عمرو بن علي قال أنبأنا يزيد قال حدثنا يونس عن حميد بن هلال عن عبد الله بن الصامت
قال رسول الله ﷺ إذا كان أحدكم قائما يصلي فإنه يستره إذا كان بين يديه مثل آخرة الرحل فإن لم يكن بين يديه مثل آخرة الرحل فإنه يقطع صلاته المرأة والحمار والكلب الأسود قلت ما بال الأسود من الأصفر من الأحمر فقال سألت رسول الله ﷺ كما سألتني فقال الكلب الأسود شيطان
Reported by Muslim, in the Book of Prayer, Chapter on the amount that shields one who is praying, h: 510, from the hadith of Yunus bin Ubayd, with the same wording. It is also found in Kubra, h: 826.