I have seen some scholars wear yellow shoes in the Hawza.
We know for a fact that colors do have an impact on our moods and the energy we give off. Perhaps the Imam is trying to tell the companion to not wear black and instead wear yellow because it is a bright color which would improve the mood. I believe that if we can implement some if these orders, it wouldn’t hurt to do so.