I am dynamically creating options for dropdown I want to add diffrent font color on each of option in dropdown. This is working on Google chorome but not on ther browsers. How to solve this problem Thanks!!
Here is my code
`<div class="control">
<label for="c_color_id" id="c_color_id_main_label"> Select Color Code </label>
<select name='c_color_id[0]' data-form-part="hairforadmin_formula_form" id="c_color_id_main"
onchange="ColorCodeCurrent(this);">
<?php foreach ($colors as $option) {
if ($option['value'] == '') {?>
<option value=""> Please Add Colors from backend </option>
<?php } else {?>
<option value="<?php echo $option['value'] ?>" style="color:<?php echo $block->getColorFontById($option['value']); ?>"><?php echo $option['label'] ?></option>
<?php }
}?>
</select>
</div>`
I try to search on the internet but didnot find a simple solution that can quickly solve mt problem