Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

Specifying color in RTF

Can someone confirm or correct my understanding of specifying colors in RTF.

The RTF document declares a color table, such as:


To define text with a certain color requires referencing a certain index in the color table, such as:

{\f1\cb1\cf2 This is colored text. The background is color 1 and the foreground is color 2.}

So am i right in thinking that all colors must be defined in the color table, and then subsequently referenced? Is there no way to define the color adjacent to the text? .. or somehow overwrite the color table?
  • 2
1 Solution
Geert BormansCommented:
I am afraid that there is no other way than dealing with a colortable
You can easily add colors to the color table, and use the incremental number
In your example you have 5 colors
You could add a sixth one
and now use \cf6
I have done that before in several occasions, and allthough it requires some counting, it works well


paddycobbettAuthor Commented:
Thanks, i've now implemented a solution which relys on the color table.. but thanks for reassuring me that it was the only way to do it =)
Geert BormansCommented:

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now