Dyeing grey hair is Sunnah and is part of the teachings of Islam. It means dyeing grey hair on the head and in the beard, for men. For women, it refers to the hair of the head.
Narrated Abu Huraira (R.A) : The Prophet (pbuh) said, “Jews and Christians do not dye their hair so you should do the opposite of what they do. (Volume 7, Book 72, Number 786: Sahih Bukhari. 3275; Muslim, 2103).
Narrated Abu Umaamah (R.A): “O Ansaar, dye your hair red and yellow, and be different from the A’aajim (Persians).” (Narrated by Ahmad, 21780. The isnaad of this hadeeth was classed as hasan by al-Haafiz Ibn Hajar in al-Fath, 10/354).
Changing grey hair by dyeing it black is haraam. This is the opinion of the majority of scholars, who forbid it completely, because of the hadeeth of the Messenger (pbuh), when he saw Abu Quhaafah. Jaabir said: the Messenger of Allah (pbuh) said, when he saw his head looking as white as the thaghaamah plant, “Change this…” (Narrated by Muslim, 2102).
And the Prophet (pbuh) said: There are people who dye their hair black like the crops of pigeons; they will never smell the fragrance of Paradise.” (Narrated by Abu Dawood, 4212; al-Nasaa’i, 5075).
Ibn Hajar said: the isnaad of this hadeeth is qawiy (strong), but there is some dispute as to whether it is marfoo’ (narrated from the Prophet (pbuh)) or mawqoof (the isnaad stops at the Sahaabi). But even if we agree that it is mawqoof, it still has the status of being marfoo’, because the Sahaabah would not have spoken on the basis of their own opinions, i.e., it must be something that they heard from the Prophet (pbuh)). Fath al-baari, 6/499.
With regard to katam, Ibn Hajar said:
Katam is a plant from Yemen which produces a reddish-black dye. Henna produces a red dye, so when they are used together as a dye, they produce a colour that is between black and red. Fath al-Baari, 10/355.
Did the Sahaabah use katam? Yes, they did that and so did the Messenger of Allaah (pbuh).
It was reported that ‘Uthmaan ibn ‘Abd-Allaah ibn Wahb (R.A) said: we entered upon Umm Salamah (R.A) and she brought out a lock of hair of the Messenger of Allah (pbuh) to show us, and it was dyed red. (Narrated by al-Bukhaari, 5558. Ibn Maajah (3623) and Ahmad (25995) added: “… with henna and katam.”)
The Messenger of Allah (pbuh) said: “The best things to use to change grey hair are henna and katam.” (Narrated by al-Tirmidhi, 1753; Abu Dawood, 4205; Ibn Maajah, 3622). Al-Tirmidhi said: the hadeeth is hasan saheeh). Abu Bakr (R.A) dyed his hair with henna and katam. (Narrated by Muslim, 2341).
It may be noted that in the ahaadeeth where katam is mentioned, it is always accompanied by henna, because what is meant by the ahaadeeth is that the hair should be dyed with katam mixed with henna.
Ibn al-Qayyim said:
What is prohibited is making the hair pure black, but if something else is added to henna, such as katam etc., there is nothing wrong with that. Katam and henna make the hair a colour between red and black, unlike wasmah (woad leaves) which make the hair black as coal. This is saheeh. (Zaad al-Ma’aad, 4/336). (Wasmah or woad is a plant that is used for dyeing).
Hence we know that katam is not to be used on its own, because it gives a pure, coal-black colour, but it may be used with henna to give a black colour with reddish highlights. Hence we can reconcile the ahaadeeth.
And Allaah knows best.