Method XbpPresSpace():setColorIndex() Foundation
Sets or returns the RGB color values for a color.
:setColorIndex( <nColorIndex>, [<aRGB1>|<aRGB2>] ) --> aOldRGB
The :setColorIndex() method returns an array of three elements that contains the RGB color values for the color <nColorIndex>. When new RGB color values are set, the method returns the previous RGB color values in the array.
The :setColorIndex() method determines the RGB color values for a specific color specified by <nColorIndex>. Graphic output colors are selected using numeric values and the SetColor() function has no effect on the output of graphic functions.
Within a presentation space, the colors 0 to 15 are generally reserved and cannot be redefined. The exeption is a pesentation space that is associated with an XbpBitmap object. In this case, all colors can be redefined. Colors with an index greater than 15 can be redefined in any case by specifying RGB values that identify the intensity of the colors red, green and blue. The resulting color is the mix of these values.
The intensity for red, green and blue is specified in the three elements of the array <aRGB1>. The value range is limited to integers between 0 and 255. 0 indicates that the color is not used at all and 255 indicates that it is displayed at full intensity. There are 16.7 million different colors that can be assigned for graphic output using :setColorIndex(). Most graphics cards support only 256 simultaneous color definitions. This means that only values between 16 and 255 can generally be specified for <nColorIndex>. This allows 240 simultaneous user defined colors (the colors 0 to 15 are reserved).
A two-dimensional array <aRGB2> is returned by the :getColorTable() method of an XbpBitmap object. This array can be used to "copy" the color table of a bitmap to a presentation space.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.