Lost in color space 2

Somehow I gave up on objC and returned to plain AS and command line.

set sHtml to "<body><font color=\"#FF0000\">RED </font><font color=\"#FFFF00\">YELLOW </font><font color=\"#00FF00\">GREEN </font><font color=\"#0000FF\">BLUE </font><font color=\"#00FFFF\">CYAN </font><font color=\"#FF00FF\">PURPLE </font></body>"

set dPath to POSIX path of (path to desktop)
set htmlPath to (dPath & "tmpData.html") as string
set rtfPath to (dPath & "tmpData.rtf") as string

set shellScript to "echo " & quoted form of sHtml & " > " & quoted form of htmlPath
do shell script shellScript
repeat 50 times
	set convScript to "textutil -convert rtf " & quoted form of htmlPath
	do shell script convScript
	set convScript to "textutil -convert html " & quoted form of rtfPath
	do shell script convScript
end repeat

Running the script on Mojave makes the resulting HTML useless, running it on High Sierra works fine.
Any ideas here?

It’s pretty clearly a bug. But you’re probably going to have more luck finding a workaround if you explain exactly what you you are trying to do, and in what context.