Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKBOOK_V97 > of_set_custom_color

of_set_custom_color() method

Override one of the built-in palette values with a more suitable color.

Syntax

workbook.of_set_custom_color(index, red, green, blue)

Parameters

IndexA long identifying the color index which you want to override
RedThe integer value of the red component of the desired color
GreenThe integer value of the green component of the desired color
BlueThe integer value of the blue component of the desired color

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Description

A new color is set using its RGB (red green blue) components. The red, green and blue values must be in the range 0..255.

Examples

book.of_set_custom_color(32, 200, 200, 200) //set custom color with index 32
format.of_set_color ( 32 ) //using defined color