Darkening and changes in the face because of terminal illness or after death are not indicative of a bad end or that the individual was not righteous. This often happens for physiological reasons, such as low levels of oxygen in the blood, or pooling of the blood in a particular place, or weakening of the heart muscle, or kidney failure, or cirrhosis of the liver, or other pathological causes.
There is no shar‘i evidence to suggest that darkening or changing in the face at the time of death is one of the signs of a bad end. No one should be deceived by the many stories that are told concerning that.
Rather the sign of a person’s righteousness is his piety, and the sign of his wickedness is how far removed he is from piety.
The one who sees anything of that nature should conceal it and not speak about it to people, out of respect for the rights of his fellow Muslim and so as to protect his dignity.
Al-Muwaffaq al-Maaliki said in at-Taaj wa’l-Ikleel (3/25):
Ibn al-‘Arabi narrated that it is only enjoined to cover the face of the deceased because his face may change in an alarming manner because of illness, and those who have no knowledge may think something that is not permissible to think. End quote.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: It may be – Allah forbid – that his face is seen to have darkened and changed a great deal from how it was when he was alive. Hence it is not permissible to tell people, “I saw his face had darkened,” because if he says that, the people will think ill of him.
End quote from ash-Sharh al-Mumti‘, 5/298
For more information, please see the answer to question no. 114666
But if nothing is known of the person’s life in this world except his evil deeds, wrongdoing and transgression of the limits set by Allah, then in addition to that his face becomes darkened or ugly the time of death, or he refused to utter the Shaahadatayn (twin declaration of faith) and so on, then that is usually the sign of a bad end.
See also the answer to question no. 184737 for more information on signs that indicate that the person was in a good state when he died, and the signs that indicate that he was in a bad state.
And Allah knows best.