Praise be to Allah.
Firstly: dyeing grey hairs is Sunnah and is part of the teachings of Islam. It means dyeing grey hairs on the head and in the beard, for men. For women, it refers to the hair of the head.
It was reported that Abu Hurayrah said: the Prophet(peace and blessings of Allaah be upon him) said: “The Jews and the Christians do not dye their hair, so be different from them.” (Narrated by al-Bukhaari, 3275; Muslim, 2103).
It was reported that Abu Umaamah (may Allaah be pleased him) said: “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).
Secondly: 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 (peace and blessings of Allaah be upon him), when he saw Abu Quhaafah. Jaabir said: the Messenger of Allaah (peace and blessings of Allaah be upon him_ said, when he saw his head looking as white as the thaghaamah plant, “Change this…”(Narrated by Muslim, 2102).
And the Prophet (peace and blessings of Allaah be upon him) 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 (peace and blessings of Allaah be upon him)) 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 (peace and blessings of Allaah be upon him)).Fath al-baari, 6/499.
Thirdly: 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 (peace and blessings of Allaah be upon him).
It was reported that ‘Uthmaan ibn ‘Abd-Allaah ibn Wahb said: we entered upon Umm Salamah (may Allaah be pleased with her) and she brought out a lock of hair of the Messenger of Allaah (peace and blessings of Allaah be upon him) 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 Allaah (peace and blessings of Allaah be upon him) 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 (may Allaah be pleased with him) dyed his hair with henna and katam. (Narrated by Muslim, 2341).
Fifthly: 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.