0

im trying to make a list with color names as text

i have the choice list all good all i need is a way to make the colors match up with the hex color code example: choice1: "red",choice2: "green",choice3: "blue",choice4: "yellow",choice5: "orange",choice6: "indigo",choice7: "violet",defaultValue: "blue" } im trying to get that to match up wit this: { red="FF0000",orange= "FFA500",yellow: "FFFF00=,green="00FF00",blue= "0000FF",indigo="4B0082",violet="8D38C9" } but im new to it and cant figure it out any help would be much apreciated

3rd May 2017, 1:50 AM
eli
4 Respuestas
+ 2
You can use json to refer to your color code. Check out below sample.. https://code.sololearn.com/W760W4mKMyxS/?ref=app
3rd May 2017, 3:08 AM
Calviղ
Calviղ - avatar
0
i think you need to add a hash before the hexa code like #FFFFFF
3rd May 2017, 1:54 AM
Giannis Tsirovasilis
Giannis Tsirovasilis - avatar
0
It's not clear how you are adding the list items, but if you are using html tag for the color names, then add the style attribute with the corresponding color hex code (i.e. style="color:#XXXXXX").
3rd May 2017, 2:09 AM
Alex
0
i dont need the hash in front of it i have it set up to not need it
3rd May 2017, 3:07 AM
eli