Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Thank you for your question which demonstrates your eagerness to do what is lawful and avoid what is prohibited.
First of all, it is be noted that Islam demands its adherents to show patience and acceptance of Allah’s will when they face the calamity of the death of a relative or loved one.
While mourning, one should avoid wearing ornaments, perfume, and so on, and should not tear one’s clothes, slap one’s cheeks, shave one’s hair, and other forbidden acts. This does not preclude that people may grieve for their deceased and they may express their grief with shedding tears. This sort of crying must not be accompanied by wailing. That is un-Islamic. Societies have different customs and traditions associated with death in the family. There is no religious text in the Qur’an or the Sunnah indicating that one should wear black clothes while mourning, but there is the prohibition of wearing clothes that go against the spirit of grieving. The specification of such clothes is left for convention to decide.
In his response to your question, Sheikh `Atiyyah Saqr, former head of Al-Azhar Fatwa Committee, states,
Grieving over the dead is a natural thing acknowledged in the religion of Islam. Among its features are refraining from adorning oneself by wearing perfume or using dyes whether on the body or on one’s clothing. Refraining from this is incumbent upon the widow from the time of her husband’s death until she gives birth if she is pregnant, or for four months and ten days if she is not pregnant. But it is prohibited for a woman to mourn the death of anyone other than her husband for more than three days even if the deceased is her father or her child. Refraining in this way is called Hidad or Ihdad, which means ‘mourning’, and it is only permissible for women.
It is recorded by Al-Bukhari and Muslim that Zaynab bint Abu Salamah came to the mother of the believers Umm Habibah (may Allah be pleased with her) at the time of Abu Sufyan’s death (he was her father). After three days, she asked for some yellow perfume and scented her cheeks and forearms. Then she said, “No doubt, I would not have been in need of this, had I not heard the Messenger of Allah (peace and blessings be upon him) saying from the pulpit, ‘It is not legal for a woman who believes in Allah and the Last Day to mourn for more than three days for any dead person except her husband, for whom she should mourn for four months and ten days.’”
While mourning, Muslims should not wear clothes that are against the spirit of grieving. These differ in form, color, and type according to different conventions. It is even mentioned in the books of history and journeys that mourning clothes are white in some countries. The Prophet (peace and blessings be upon him) gave an example from the tradition of the Arabs at that time, as he prohibited wearing clothes dyed with saffron for they were a kind of decorative clothing which does not suit mourning.
Black is the color chosen in some countries for mourning, but this is not based on any text in the religion of Islam. Wearing this color is a part of convention and habit. Imam As-Siyuti mentioned in his book Al-Awa’il that the first people to wear black clothes were the Abbasids when the Umayyad imam Marawan Ibrahim, who reclaimed the Caliphate, was killed. For this reason the color black became their chosen color for mourning from that time onward. Moreover, it was said that the Egyptians chose black clothes for their mourning over the Coptic martyrs in the reign of Diqlidyanus who slaughtered a hundred and eighty thousand Christians in one day.
To conclude, there is no religious text in the Qur’an or the Sunnah indicating that one should wear black clothes while mourning, but there is the prohibition of wearing clothes that contradict grieving. The specification of such clothes is left for convention to decide. In addition, it should be stressed that mourning is incumbent for women only at the husband’s death and is permissible for them at anyone else’s death. Mourning is not permissible for men whose minds are stronger than their emotions.
Allah Almighty knows best.