Programming with Reflection

image\rwnprg32.gif SetColorRGB method

 

Syntax object.SetColorRGB Color, Red, Green, Blue

 

Description

Reflection creates displays using a palette of 16 colors. (You can view these colors on the Colors tab in the Display Setup dialog box.) This method adjusts the appearance of a specified color from the palette. Color adjustment is made by assigning a value each of three basic color components—red, green, and blue.

For example, the following statement redefines red and makes it black, by specifying zero for all color components. (After Reflection executes this command, you will see two black tiles in the Text and Background areas on the Color tab in the Display Setup dialog box—the original black tile, and the one that had originally been red.)

Session.SetColorRGB rcRed, 0, 0, 0

Restoring color defaults with RestoreDefaluts returns the red color to its original definition:

Session.RestoreDefaults rcColors

Changes you make to a color affect the appearance of any host attributes configured to use that color. To configure host attribute colors programmatically, use the SetColorMap method. (Changes you make to colors using SetColorRGB also affect text configured using the Color tab in the Display Setup dialog box.)

Arguments

Color Argument type: Enumeration
Required
The color being adjusted. (Note: Changes you make using SetColorRGB may mean that the constant rcRed is no longer associated with a red color.) The possible values are:

 rcWhite
rcGrey
rcRed
rcBlue
rcGreen
rcYellow
rcCyan
rcMagenta
rcBlack
rcDkGrey
rcDkRed
rcDkBlue
rcDkGreen
rcDkYellow
rcDkCyan
rcDkMagenta

Red Argument type: Integer
Required
An integer value indicating the degree of red saturation you want. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and OpenVMS. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.

Green Argument type: Integer
Required
An integer value indicating the degree of green saturation you want. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and OpenVMS. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.

Blue Argument type: Integer
Required
An integer value indicating the degree of blue saturation you want. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and OpenVMS. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.

Note: This method is not valid if your terminal type is set for ANSI emulation (TerminalType is set to either rcANSIBBS or rcANSIUNIX). For ANSI terminal emulation, use SetAnsiColorRGB to configure your colors.

 

 

image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command