Built-In Color Table

<< Click to Display Table of Contents >>

Navigation:  Programming Techniques > RTF - Rich Text Format > Controlling RTF from VPE – ‘Easy RTF’ >

Built-In Color Table

Previous pageReturn to chapter overviewNext page

VPE has build-in a predefined color table. The colors are pre-defined as:

color1

BLACK

RGB(0, 0, 0)

color2

DKGRAY

RGB(128, 128, 128)

color3

GRAY

RGB(192, 192, 192)

color4

LTGRAY

RGB(230, 230, 230)

color5

WHITE

RGB(255, 255, 255)

color6

DKRED

RGB(128, 0, 0)

color7

RED

RGB(192, 0, 0)

color8

LTRED

RGB(255, 0, 0)

color9

DKORANGE

RGB(255,  64, 0)

color10

ORANGE

RGB(255, 128, 0)

color11

LTORANGE

RGB(255, 192, 0)

color12

DKYELLOW

RGB(224, 224, 0)

color13

YELLOW

RGB(242, 242, 0)

color14

LTYELLOW

RGB(255, 255, 0)

color15

DKGREEN

RGB(0, 128, 0)

color16

GREEN

RGB(0, 192, 0)

color17

LTGREEN  

RGB(0, 255, 0)

color18

HIGREEN

RGB(0, 255, 128)

color19

BLUEGREEN

RGB(0, 128, 128)

color20

OLIVE

RGB(128, 128, 0)

color21

BROWN

RGB(128,  80, 0)

color22

DKBLUE

RGB(0, 0, 128)

color23

BLUE

RGB(0, 0, 255)

color24

LTBLUE

RGB(0, 128, 255)

color25

LTLTBLUE

RGB(0, 160, 255)

color26

HIBLUE

RGB(0, 192, 255)

color27

CYAN

RGB(0, 255, 255)

color28

DKPURPLE

RGB(128, 0, 128)

color29

PURPLE

RGB(192, 0, 192)

color30

MAGENTA

RGB(255, 0, 255)

 

You can modify the table with the method:

void SetRTFColor(

long ID,

COLORREF rtf_color

)

For example change color1 with:

SetRTFColor(1, RGB(10, 10, 10))

Or you can add as many colors to the table as you like, for example:

SetRTFColor(31, RGB(10, 20, 30))

 

NOTE: RTF offers no way to set a transparent background mode, like VPE does. So we decided, to set the background mode to transparent, in the case you use WHITE = RGB(255, 255, 255) as background color.