When and how did the color blue come to denote sadness?

by mercurial_zephyr
Ossidjana

This question is more appropriate in the sub r/etymology. However, from the entry “blue” on etymonline : “Figurative meaning "sad, sorrowful, afflicted with low spirits" is from c. 1400, perhaps from the "livid" sense and implying a bruised heart or feelings.”