Sounds like you're fighting against a lexer. A lexer's job is to basically detect when the text has changed (or window is painted) and update the color accordingly. If you've accidentally (or intentionally) set the control to use a lexer, it might be what's causing your changes to get overwritten.
The best way to do custom coloring is to set the lexer to Container and handle the StyleNeeded event. This event fires every time Scintilla thinks the colors should be updated (because of changes, etc...). In that way you are working with the lexer instead of against it.
If you don't feel like you need to go so far as handling the event and just want to occasionally do some custom coloring, then you'll want to make sure the lexer is not set or is set to Null.
Jacob
The best way to do custom coloring is to set the lexer to Container and handle the StyleNeeded event. This event fires every time Scintilla thinks the colors should be updated (because of changes, etc...). In that way you are working with the lexer instead of against it.
If you don't feel like you need to go so far as handling the event and just want to occasionally do some custom coloring, then you'll want to make sure the lexer is not set or is set to Null.
Jacob