You can try an array of clusters. The cluster will contain a string indicator and a color box. Make the string indicator background transparent and put the color box behind the string. You can use the color box to set the reqd colors.
Every time you get new data, you will have to append it to the array using Build array function.
Thanks to all for your suggestions. I don't want to pursue the solution which requires the maintenance of an array of colour data, so I will stick with using a prefix for now.