How can I change the color of the Tag dependent on the option chosen (using pure JavaScript)?
I am trying to build a select tag, where dependent on the option chosen (colors in this case), I want the select tag box to change into that background-color. However, when I try this I can only get it to change to the uppermost child’s color (black). How can make it, so it works as intended?