Color handling color-handling

The RTF specification permits RGB color values specified with \colortbl. Each component is provided separately with the \red, \green, and \blue commands.

The proprietary RTF extension command \cmykcolortbl allows specifying CMYK colors, with each color component provided with the \cyan, \magenta, \yellow, and \black commands.

Color component values for \colortbl are in the range 0–255. Component values for \cmykcolortbl are in the range 0–100.

The RTF extension command \*\iscolortbl, supported by textPs=, provides a way to specify a color table with standard Image Serving color values, with full RGB, gray, CMYK, and alpha support. It has the following syntax:

{\*\iscolortbl; *colors*;}

colors one or more IS color values, separated with ‘;’

More than one type of color table may be specified in the same text= or textPs= RTF string. Each color table can have a different number of entries. Image Serving attempts to find colors in this order: \iscolortbl before \cmykcolortbl (only if the pixel type of the text layer is CMYK) before \colortbl. For textPs= only, colors are accurately converted between CMYK and RGB, if so required (for example, when RGB colors are specified but CMYK output is required). If no color for a particular index value is found, the default color (black) is used.

Refer to color for a description of the syntax of IS color values.

Restrictions section-c5173e672d854e4aa9656844f7fc4d0e

The modifier text= does not support \*\iscolortbl. The modifier textPs= does not support \cmykcolortbl.

Color selections are ignored when rendering Photofonts.

Example section-0f166bb72bd44479be01131077851142

Allow three text colors to be controlled with variables, while still displaying the color default value when the RTF string is opened in a standard RTF text editor.

…&$c1=ff0000&$c2=00ff00&$c3=0000ff&textPs={{\*\iscolortbl;$c1$;$c2$;$c3$;}{\colortbl;\red255;\green0;\blue0;\red0;\green255;\blue0;\red0;\green0;\blue255;}…}…

recommendation-more-help
a26166cd-f2f4-45ce-996d-96a0f0d6cf49