My question involves using an HTML selector that allows the user to choose a color.
<select name="color" class="form-control">
<option value="ff0000">Red</option>
<option value="ff7f00">Orange</option>
<option value="ffff00">Yellow</option>
<option value="7fff00">Chartreuse</option>
<option value="00ff00">Green</option>
<option value="00ff7f">Spring Green</option>
<option value="00ffff">Cyan</option>
<option value="007fff">Azure</option>
<option value="0000ff">Blue</option>
<option value="7f00ff">Violet</option>
<option value="ff00ff">Magenta</option>
<option value="ff007f">Rose</option>
</select>
I would like each option in the color picker to be displayed with its corresponding color so users can easily identify their choice. Is there a way to achieve this?
EDIT: To clarify, I am looking for the selected color to be represented like a paint swatch upon highlighting. If this is not possible, changing the background color of the picker to match the selected color will suffice.