I have a list of colors i am retrieving from the database the list contains the colorCode e.g. #FFEBCD, #FFFFFF and so on i would like to set the background color of each option in the list to its background color. Can someone tell me if this is possible and how can i get the each list items to reflect their color using the color code. Under is the code. I want to really show the color as the background of the list item.
<li>
<form:label for="eyeColorId" path="eyeColorId">Select Eye Color</form:label>
<form:select path="eyeColorId" id="eyeColorId">
<form:options items = "${eyeColor.eyeColorList}" itemValue="colorCode" itemLabel="colorDesc" style="background-color: ${colorCode}"/>
</form:select>
<form:errors path="eyeColorId" id="errors"/>
</li>