Link to home
Start Free TrialLog in
Avatar of paddycobbett
paddycobbett

asked on

RTF code for highlighting text

What is the RTF code for highlighting text? (i.e it's background color)

In the case of specifying text foreground colors, the color code needs to be declared in a color table at the head of the file. Then to specify the foreground text colour I would use the following RTF code:

\\cf3

.. where the 3 indicates the color index in the color table. My first question is what is the RTF code for specifying a highlighted block? what would go in place of \\cf?? .. and secondly and it would be logical, is the highlighting colour specifyed by putting an entry into the colour table and then referencing it as is done in the case of foreground colors?
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of paddycobbett
paddycobbett

ASKER

Thanks, i had seen that link as it so happens.. but it seems to suggest that text can only be highlighted using 1 of only 16 colors? Is that really the case, and any obvious reason why it is restricted as such??
In Word, there are fifteen colours in the Highlight selection palette, plus 'None', so that corresponds.

However, also in Word, you can achieve a similar effect, but with more colours, using character shading.