Programming with Reflection

image\rwnprg32.gif SetAnsiColorRGB method

 

Syntax object.SetAnsiColorRGB Color, Red, Green, Blue

 

Description

Adjusts the appearance of ANSI display colors. This method is only valid when your terminal is set for ANSI emulation, that is when TerminalType is set to either rcANSIBBS or rcANSIUNIX. (To adjust the display colors for any other terminal type use SetColorRGB.) Changes you make to colors with this command affect colors displayed by a host program. For example, if you change the blue color, your new color will be used whenever a host program displays blue.

Color adjustment is made by assigning values to the three basic color components—red, green, and blue. For example, the following statement redefines black, and makes it dark grey by using new, greater values for each of the three color components. (By default, black is defined by using zero for each of the three components.) Executing this command changes the default ANSI background color.

Session.SetAnsiColorRGB rcAnsiBlack, 20, 20, 20

Restoring color defaults with RestoreDefaults returns the black color to its original definition:

Session.RestoreDefaults rcColors

Arguments

Color Argument type: Enumeration
The color being adjusted. Only the first eight colors are available for ANSI-BBS terminal emulation (TerminalType = rcANSIBBS). All 16 colors are available for SCO-ANSI terminal emulation (TerminalType = rcANSIUNIX).

 

rcAnsiBlack

rcAnsiBlue

rcAnsiGreen

rcAnsiCyan

rcAnsiRed

rcAnsiMagenta

rcAnsiBrown

rcAnsiWhite

rcAnsiGrey (SCO-ANSI)

rcAnsiLtBlue (SCO-ANSI)

rcAnsiLtGreen (SCO-ANSI)

rcAnsiLtCyan (SCO-ANSI)

rcAnsiLtRed (SCO-ANSI)

rcAnsiLtMagenta (SCO-ANSI)

rcAnsiYellow (SCO-ANSI)

rcAnsiLtWhite (SCO-ANSI)

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 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 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 UNIX and OpenVMS. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.

 

Note: This method is not available in Reflection for HP.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command