Previous Page | Next Page

Customizing the SAS Windowing Environment

Customizing Colors under OpenVMS


Default Color and Attribute Settings

SAS ships to all sites a default set of colors and attribute settings for the elements of all SAS windows. Although the same setting for each element is shipped to all sites, the implementation of that setting is determined by device type, logically and physically. Thus, settings might vary among sites and across operating environments.

On-site SAS support personnel can create the catalog entry SASHELP.BASE.SAS.CPARMS. The color and attribute settings in this catalog become default for the site.


Methods for Customizing the Color Settings in Your SAS Session

As an individual user, you can customize the colors in your SAS session by using one of the following methods:


Customizing Colors Using the SASCOLOR Window


How to Open the SASCOLOR Window

You can use the SASCOLOR window to change the color and highlighting of specific elements of SAS windows. To open the SASCOLOR window, do one of the following:


Changing the Color of a Window Element

To change a color for a window element, complete the following steps:

  1. Select the element name.

  2. Select the color and attribute that you want assigned to the element.

  3. Click OK to make the color change.

Click Cancelto ignore any changes you made and close the SASCOLOR window. To return all tools in the current toolbox to their default settings, click Defaults. When you click Save, your changes are saved to the catalog entry SASUSER.PROFILE.SAS.CPARMS.

Note:   Close and reopen any active windows for new color settings to take effect.  [cautionend]

For more information about the SASCOLOR window, see the Base SAS section in the online SAS Help and Documentation.


Defining Color Resources


What Are CPARMS Resources?

You can define window colors and attributes by assigning values to SAS resources known as CPARMS. The CPARMS resources are divided into classes, each of which defines the color and attribute of a specific window element, such as the background in a secondary window or the border of a primary window.


Categories of Color Resources

Color resources fall into two categories:

foreground and background definitions

These resources enable you to customize the RGB values that are used to define the 12 DMS colors. Because each color could be used as either a background or a foreground color, you can specify different RGB values or color names for each color for each usage. For example, you can specify that when blue is used as a foreground color that color #0046ED is used, and when blue is used as a background that CornflowerBlue is used. For more information, see Specifying RGB Values or Color Names for Foreground and Background Resources.

window element definitions

These resources, which are referred to as CPARMS resources, enable you to specify which of the 12 DMS colors you want to use for each window element. For example, you can specify that message text is displayed in magenta. For more information, see Defining Colors and Attributes for Window Elements (CPARMS).

The two types of resources work together. The CPARMS color values use the current foreground and background definitions. For example, the following resources specify that the background of your primary windows will be CornflowerBlue:

SAS.blueBackgroundColor: CornflowerBlue
SAS.cparmBackground: DmBlue


Specifying RGB Values or Color Names for Foreground and Background Resources

SAS uses SAS.systemBackground , SAS.systemForeground , and the resources listed in the following table to determine the colors to be used in the SAS windows:

SAS.systemForeground

specifies the color for the foreground system color in the SASCOLOR window.

SAS.systemBackground

specifies the color for the background system color the SASCOLOR window.

SAS.systemSecondaryBackground

sets the system secondary background color and specifies the color for the secondary background system color in the SASCOLOR window.

You can specify color names such as MediumVioletRed or RGB values such as #0000FF for all of the foreground and background resources. For more information about RGB color values, see your X Window System documentation.

The following table lists all of the foreground and background color resources and their class names. All of these resources are of the type String.

Foreground and Background Color Resources
Resource Name Class Name
SAS.systemForeground SystemForeground
SAS.systemBackground SystemBackground
SAS.systemSecondaryBackground Background
SAS.blackForegroundColor BlackForegroundColor
SAS.blueForegroundColor BlueForegroundColor
SAS.brownForegroundColor BrownForegroundColor
SAS.cyanForegroundColor CyanForegroundColor
SAS.grayForegroundColor GrayForegroundColor
SAS.greenForegroundColor GreenForegroundColor
SAS.magentaForegroundColor MagentaForegroundColor
SAS.orangeForegroundColor OrangeForegroundColor
SAS.pinkForegroundColor PinkForegroundColor
SAS.redForegroundColor RedForegroundColor
SAS.whiteForegroundColor WhiteForegroundColor
SAS.yellowForegroundColor YellowForegroundColor
SAS.blackBackgroundColor BlackBackgroundColor
SAS.blueBackgroundColor BlueBackgroundColor
SAS.brownBackgroundColor BrownBackgroundColor
SAS.cyanBackgroundColor CyanBackgroundColor
SAS.grayBackgroundColor GrayBackgroundColor
SAS.greenBackgroundColor GreenBackgroundColor
SAS.magentaBackgroundColor MagentaBackgroundColor
SAS.orangeBackgroundColor OrangeBackgroundColor
SAS.pinkBackgroundColor PinkBackgroundColor
SAS.redBackgroundColor RedBackgroundColor
SAS.whiteBackgroundColor WhiteBackgroundColor
SAS.yellowBackgroundColor YellowBackgroundColor


Defining Colors and Attributes for Window Elements (CPARMS)

You specify CPARMS resources just as you would specify any other SAS X resource in an X resource file. You specify CPARMS values either in your resource file or with the -xrm option, which can be used as a system option or on the SAS command line. (The -xrm option is also described in XRESOURCES= System Option: OpenVMS.)

Use the following syntax to specify CPARMS values:

SAS.cparmResource: DmColorName|DmAttrName\ 
[+ DmColorName|DmAttrName]

Resource can be any of the CPARMS resources listed in the following table. All of these resources are of the type DmColor, and their default values are dynamic--that is, the default values are determined at run time.

SAS CPARMS Resources
Resource Name Target for Color and Attribute Settings Class Name Default Color
SAS.cparmBackground backgrounds within all primary windows displayed in a SAS session. CparmBackground DmWhite
SAS.cparmBanner a banner within a window. CparmForeground DmBlack
SAS.cparmBorder the border of a primary window. CparmBackground DmBlack
SAS.cparmByline BY lines written to the Output window. CparmForeground DmBlue
SAS.cparmColumn text labels for column information. You can use this resource within the SAS editor to identify editing lines and in spreadsheet windows to label spreadsheets. CparmForeground DmBlue/ Underline
SAS.cparmCommand the command data entry field when menus are disabled. CparmForeground DmBlack
SAS.cparmData general lines written to the Log window or the Output window. CparmForeground DmBlack
SAS.cparmError ERROR: lines that are written to the Log window or the Output window. CparmForeground DmRed
SAS.cparmFootnote FOOTNOTE lines written to the Output window. CparmForeground DmBlue
SAS.cparmForeground all text fields within a SAS windowing environment window that can be edited. CparmBackground DmBlack
SAS.cparmHeader HEADER lines written to the Output window. CparmForeground DmBlue
SAS.cparmHelpLink links to additional levels of information in the HELP system. CparmForeground DmGreen/ Underline
SAS.cparmHelpMainTopic topic words or phrases in the HELP system. CparmForeground DmBlack
SAS.cparmHelpSubTopic topic words or phrases in the HELP system. CparmForeground DmBlack
SAS.cparmInfo text that is displayed in a window as an aid to the user (for example: Press Enter to continue ). CparmForeground DmBlack
SAS.cparmLabel text that precedes a widget. For example, the text Name: in the following example is a label:
Name: ______________.
CparmForeground DmBlack
SAS.cparmMark areas that have been selected for operations such as FIND, CUT, and COPY. CparmForeground DmBlack/ DmReverse
SAS.cparmMessage the message field. CparmForeground DmRed
SAS.cparmNote NOTE: lines that are written to the Log window or the Output window. CparmForeground DmBlue
SAS.cparmSecondaryBackground backgrounds in secondary windows. CparmForeground DmGray
SAS.cparmSecondaryBorder the border of a secondary window. CparmForeground DmBlack
SAS.cparmSource SAS source lines that are written to the Log window. CparmForeground DmBlack
SAS.cparmText text labels for row information. You can use this resource within the SAS editor to identify editing lines and in spreadsheet windows to label spreadsheet rows. CparmForeground DmBlue
SAS.cparmTitle TITLE lines written to the Output window. CparmForeground DmBlue
SAS.cparmWarning WARNING lines written to the Log window or the Output window. CparmForeground DmGreen

DmColorName can be any one of the following colors:

DmBLACK DmMAGENTA
DmBLUE DmORANGE
DmBROWN DmPINK
DmCYAN DmRED
DmGRAY DmWHITE
DmGREEN DmYELLOW

DmAttrName can be any one of the following attributes:

DmHIGHLIGHT
DmUNDERLINE
DmREVERSE
You can specify attribute names and color names in any order. If you specify more than one color name for a single class, then SAS uses the last color that you specified.

Example: Defining CPARMS

The following example specifies that all background colors are gray and all foreground colors are black:

SAS.cparmBackground: DmGRAY
SAS.cparmForeground: DmBLACK

You can add to these settings to make errors red with reverse video and warnings yellow with bolding and reverse video:

SAS.cparmError: DmRED + DmREVERSE
SAS.cparmWarning: 
    DmHIGHLIGHT + DmYELLOW + DmREVERSE

You can further add to these settings by making the background of secondary windows white:

SAS.cparmSecondaryBackground: DmWHITE


Controlling Color Contrast

During interactive move/stretch operations, such as rubber-banding and dragging rectangles in SAS/INSIGHT software, you might find it hard to see the outline of the graphics primitive because of the lack of contrast between the primitive and the background. The XCONTRAST command makes the primitive visible against the background. The rendering performance and the aesthetic appearance of the primitive is compromised for the sake of visibility. You can enter XCONTRAST to act as a toggle, or you can specify XCONTRAST ON or XCONTRAST OFF.

With some color combinations, text fields, push buttons, and check boxes and other foreground categories might not be visible. The following resource makes these categories legible:

SAS.dmsContrastCheck: [True | False]

controls whether contrast mapping is applied to non-graphic foreground colors in a SAS window. The value True specifies that DMS foreground colors will be remapped if necessary to produce a contrast. The default value is False, which disables contrast checking. Some color usage based on graphic operations is not affected by this resource.

Previous Page | Next Page | Top of Page