All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
The person who is going to offer a sacrifice is forbidden from shaving his hair or cutting his nails from the beginning of the month of Thul-Hijjah; this prohibition is understood to mean dislike according to the view of the majority of the scholars, contrary to the view of the Hanbali School.
An-Nawawi said, “Our view is that removing hair or cutting nails for whoever is willing to offer a sacrifice is disliked in the first ten days of the month of Thul-Hijjah until he offers the sacrifice. (Imaams) Maalik and Abu Haneefah said, 'It is not disliked.' However, Sa’eed ibn al-Musayyib, Rabee’ah, Ahmad, Is-haaq, and Daawood held the view that it is forbidden. It is also narrated from Maalik that it disliked. Ad-Daarimi, on the other hand, reported from Maalik that is prohibited when a person is offering a voluntary sacrifice but not prohibited when he is offering an obligatory sacrifice.”
As regards dyeing the beard or other hair of the body, then this is permissible whether before or after slaughtering (offering the sacrifice).
The best change for the color of a gray beard is to dye it with henna and katam (a plant that produces a reddish-black color), as the Prophet said, “The best things to use to change grey hair are henna and katam.” [Abu Daawood and others - Al-Albaani graded it saheeh (sound)]
However, dyeing hair with black color is disliked, and some scholars hold the view that it is forbidden.
An-Nawawi while interpreting the hadeeth reported by Muslim, said, “Our view is that it is desirable to dye the gray hair, for both men and women, with yellow or red but that it is forbidden to dye it with black color, according to the correct opinion; it was also said that this is only disliked. However, the chosen opinion is that it is forbidden, as per the saying of the Prophet '…avoid the black color.'”
Allaah knows best.