بسم الله الرحمن الرحيم
Dying hair or beard black is forbidden as Hadith forbids it. However, other colours red or yellow are allowed. The holy prophet Muhammad (صلى الله عليه وسلم) advised Hadhrat Abu Bakar’s father to dye red henna and asked not to apply black dye. (Mishkat p. 380)
It is necessary for imam who dyes his beard black to stop it; otherwise his imamah shall be makrooh.
Allah knows Best!
Darul Uloom Deoband