Something like this. Not sure what will happen to the spaces
but,
<cfscript>
string1 = "I am not a bookkeeper.";
string2 = "I am not a bokeeper, nor have I played one on
televsion";
myQuery = QueryNew("letter,colour","varchar,varchar");
for (i = 1; i lte len(string1); i = i + 1) {
x = QueryAddRow(myQuery);
x = QuerySetCell(myQuery, "letter", mid(string2, i, 1));
if (mid(string1, i, 1) is mid(string2, i, 1)
x = QuerySetCell(myQuery, "colour", "black");
else
x = QuerySetCell(myQuery, "colour", "red");
} // loop
if (len(string2) gt len(string1) {
for (i = len(string1) + 1; i lte len(string2); i = i + 1) {
x = QueryAddRow(myQuery);
x = QuerySetCell(myQuery, "letter", mid(string2, i, 1));
x = QuerySetCell(myQuery, "colour", "red");
} end loop
} end if
</cfscript>
<cfoutput query="myQuery">
<font color="#colour#">#letter#</font>
</cfoutput>