I'm using a Select2 drop-down, and would like to set different colors on options. I successfully changed all options to one color, but I want to variate between several ones basing on the value. I have close to 1000 options (pages in books) and I need to mark some of them (based on some set of pages) as green. May you propose the way to achieve this?
HTML
<label for="add-coord-page">P: </label>
<select class="select2" id="add-coord-page" name="pages" style="width:60px"></select>
CSS
#select2-add-coord-page-results {
color: red;
}
Example: Expected result