No it is not racist.
"Black" here is used in terms of the actual colour itself and the implications of it (lack of sunlight, gloominess, night-time, darkness, negativity).
There are other phrases that use this word, such as "black humour" which relates to very morbid, risky humour, and is nothing to do with skin colour.
One also says "the black sheep of the familly" to describe someone who is different from their peers (but relating litterally to the fact that most sheep have white wool - nothing to do with ethnic skin colour at all!)
So, no it is not racist.
But sadly, you may occasionally hear people get sensitive about such phrases. These people (in my personal experience) are not black, they are white people who are paranoid about being called racist.