Posted 28 July 2015 - 09:33 PM
Is there any method to change a string into a name (as defined by colors api)?
I have the following table and wish to change the color of text based on an entry in this table:
This returns an error stating that it was expecting a name for the colors argument.
I have looked at different ways to manipulate strings and I cannot find a method to solve this, I could create a multi-dimensional table that includes a color number for each entry, however I would prefer the table to remain as it is.
Any help or pointers would be appreciated.
I have the following table and wish to change the color of text based on an entry in this table:
colTab = {"red","white","orange","magenta"......}
term.setTextColor(colors.colTab[1])
This returns an error stating that it was expecting a name for the colors argument.
I have looked at different ways to manipulate strings and I cannot find a method to solve this, I could create a multi-dimensional table that includes a color number for each entry, however I would prefer the table to remain as it is.
Any help or pointers would be appreciated.