I managed to make this work, but it did not solve the task. I found another post from Kai here which solves it, but I am puzzled why it takes so much time to run this simple script?
activate application “TextEdit”
tell application “System Events” to tell text area 1 of scroll area 1 of window 1 of process “TextEdit” to if exists then
set {x, y} to value of attribute “AXSelectedTextRange”
if x ≤ y then tell application “TextEdit” to set color of document 1’s characters x thru y to {65535, 6196, 10546}
end if