The heart develops black spots due to sins
the Messenger of Allah said: “Verily, when the slave (of Allah) commits a sin, a black spot appears on his heart. When he refrains from it, seeks forgiveness and repents, his heart is polished clean. But if he returns, it increases until it covers his entire heart. And that is the ‘Ran’ which Allah mentioned: ‘Nay, but on their hearts is the Ran which they used to earn.’”
عَنْ رَسُولِ اللَّهِ ﷺ قَالَ إِنَّ الْعَبْدَ إِذَا أَخْطَأَ خَطِيئَةً نُكِتَتْ فِي قَلْبِهِ نُكْتَةٌ سَوْدَاءُ فَإِذَا هُوَ نَزَعَ وَاسْتَغْفَرَ وَتَابَ سُقِلَ قَلْبُهُ وَإِنْ عَادَ زِيدَ فِيهَا حَتَّى تَعْلُوَ قَلْبَهُ وَهُوَ الرَّانُ الَّذِي ذَكَرَ اللَّهُ {كلاَّ بَلْ رَانَ عَلَى قُلُوبِهِمْ مَا كَانُوا يَكْسِبُونَ} [المطففين 14]