Here is simple RTF document with many attributes changed:
And here is appropriate code for it:
{\rtf1\ansi\ansicpg1250\deff0\deflang1051{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset0 Times New Roman;}} {\colortbl ;\red0\green77\blue187;\red255\green0\blue0;} {*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 Hello. This is \cf1 blue text\cf0 . \cf2 And this text is red\cf0 . This is \i italic \i0 & \b bold\b0 .\par \f1 Even changing font to Times is possible. \fs44 This text is 22 size.\f0\fs22\par \par \par }
Changing the color is possible with flag \cfX your text here \cf0 where X is your desired color number.
Colors are saved in colortbl in the head of document (as RGB values, black is missing):
{\colortbl;\red0\green77\blue187;\red255\green0\blue0;}
so black = cf0, blue = cf1, red = cf2 etc.
To assing new text simply assign your new text to RTFText variable:
WizardForm.InfoBeforeMemo.RTFText := '{\rtf1\ansi\ansicpg1250\deff0\deflang1051{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green77\blue187;\red255\green0\blue0;}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 Hello. This is \cf2 blue text\cf0 . \cf2 And this text is red\cf0 . This is \i italic \i0 & \b bold\b0 .\par
\f1 Even changing font to Times is possible. \fs44 This text is 22 size.\f0\fs22\par
\par
\par
}';
In the example above I changed color of blue text to red.