JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="red,yellow,blue" id="colors" />

<select name="colors_dropdown" id="colors_dropdown">
   <option value="red">red</option>
   <option value="yellow">yellow</option>
   <option value="blue">blue</option>
</select>

JavaScript

var selected_colors = $('#colors').val().split(","); //array of colors from text input
    jQuery.each(selected_colors, function() {
        $("#colors_dropdown option:[value='" + this + "']").remove();
        //Or use text attribute:
        //$("#colors_dropdown option:[text='" + this + "']").remove();
    });