How exactly did the colors red and yellow become associated with socialism and communism?

by brokensilence32
LBo87

Not to dissuade other users from answering the question, but this older answer by /u/kieslowskifan (from our Popular Questions section) provides a good overview of the history of red as a colour of revolutionaries and later socialism. However, the post says nothing on the colour yellow, but I am unfamiliar with any example of yellow being associated with socialism or left-wing politics in general. Can you elaborate what you are referring to here?