so there's no simple way?
here's what I have at the moment
var newstr = "";
for (x = 0; x < so.value.length; x ++)
if (x >= index && x < index+7)
newstr += colour.charAt(x-index);
newstr += so.value.charAt(x);
so.value = newstr;
it replaces a colour in string "so.value" at position "index" with a different one "colour" (7 char hex code).
At the moment i'm looping through the whole string which takes a significant few seconds. (as there's several long strings)