I have a list looping the array of colors and I hope to bind the color value to color styling of the corresponding name. For example, INDIANRED has the color indian red.Unfortunately, the text color name was not styled color as I wanted. Help appreciated.
<ul>
<li v-for="redColor in redColors">
<p v-bind:style="{ color: '{{redColor.hexcode}}' }">{{redColor.name}}</p> {{redColor.hexcode}} {{redColor.rgbcode}}
<hr>
</li>
</ul>
data () {
return {
redColors : [
{name: 'INDIANRED', hexcode:'#CD5C5C', rgbcode:'RGB(205,92,92)' },
{name: 'LIGHTCORAL', hexcode:'#F08080', rgbcode:'RGB(240, 128, 128)' },
{name: 'SALMON', hexcode:'#FA8072', rgbcode:'RGB(250, 128, 114)'},
{name: 'DARKSALMON', hexcode:'#E9967A', rgbcode:'RGB(233, 150, 122)' },
{name: 'LIGHTSALMON', hexcode:'#CD5C5C', rgbcode:'RGB(255, 160, 122)' },
{name: 'CRIMSON', hexcode:'#DC143C', rgbcode:'RGB(220, 20, 60)' },
{name: 'RED', hexcode:'#FF0000', rgbcode:'RGB(255, 0, 0)' },
{name: 'FIREBRICK', hexcode:'#B22222', rgbcode:'RGB(178, 34, 34)' },
{name: 'DARKRED', hexcode:'#8B0000', rgbcode:'RGB(139, 0, 0)' },
],
}
}