However, only those directly related to the deceased or very closely associated to the deceased mourn the dead
What ? 
Anyone can mourn anyone. You don't have to be 'directly related' or perceived to be 'very closely associated'.
What an odd thing to say.
Others are there to show respect, support and commiserate. Dark / black attire is not necessary for this.
Unfortunately I've been to quite a few funerals in the last 2 years. People from different walks of life and different traditions and backgrounds. People overwhelmingly wear black, whatever their relationship to the deceased.
I mean, it isn't necessary, in that, no-one's going to turn you away, but it is very common practice.