Chapter Contents

Previous

Next
SAS Companion for the OpenVMS Operating Environment

Customizing Colors

The SAS system 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 may vary among sites and across operating environments.

Optionally, the SAS Installation Coordinator can create the catalog entry SASHELP.BASE.SAS.CPARMS. The color and attribute settings in this catalog become default for the site.

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


Using 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:

To change a color for a window element, select the element name, and then select the color and attribute that you want assigned to the element.

Click on [OK] to make the desired color change. You will not see your changes in windows that are already open. To see the new settings you must close the windows and re-open them.

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

For more information about the SASCOLOR window, refer to the SAS online Help.


Defining Color 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.

Color resources fall into two categories:

foreground and background definitions
These resources allow you to customize the RGB values that are used to define the 12 DMS colors. Since 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, allow 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

The SAS system uses SAS.systemBackground, SAS.systemForeground, and the resources listed in Foreground and Background Color Resources 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, refer to your X Window System documentation.

Foreground and Background Color Resources 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 with the SAS system option XRESOURCES=.)

Use the following syntax to specify CPARMS values:

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

Resource can be any of the CPARMS resources listed in Defining the CPARMS Resource Set 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.

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.

Defining the CPARMS Resource Set

The CPARMS resource set contains the following values:

SAS.cparmBackground
specifies the color and attribute settings for backgrounds within all primary windows displayed in a SAS session. The default is DmWhite.

SAS.cparmBanner
specifies the color and attribute settings for a banner within a window. The banner is the command line prompt. The default is DmBlack.

SAS.cparmBorder
specifies the color and attribute settings for the border of a primary window. The default is DmBlack.

SAS.cparmByline
specifies the color and attribute settings for BY lines written to the Output window. The default is DmBlue.

SAS.cparmColumn
specifies the color and attribute settings for text labels for column information. You can use this resource within the SAS editor to identify editing lines and in spreadsheet windows to label spreadsheet. The default is DmBlue/Underline.

SAS.cparmCommand
specifies the color and attribute settings for the command data entry field when menus are disabled. The default is DmBlack.

SAS.cparmData
specifies the color and attribute settings for general lines written to the Log window or the Output window. The default is DmBlack.

SAS.cparmError
specifies the color and attribute settings for ERROR: lines that are written to the Log window or the Output window. The default is DmRed.

SAS.cparmFootnote
specifies the color and attribute settings for FOOTNOTE lines written to the Output window. The default is DmBlue.

SAS.cparmForeground
specifies the color and attribute settings for all text fields within a SAS windowing environment window that can be edited. The default is DmBlack.

SAS.cparmHeader
specifies the color and attribute settings for HEADER lines written to the Output window. The default is DmBlue.

SAS.cparmHelpLink
specifies the color and attribute settings for links to additional levels of information in the HELP system. The default is DmGreen/Underline.

SAS.cparmHelpMainTopic
specifies the color and attribute settings for topic words or phrases in the HELP system. The default is DmBlack.

SAS.cparmHelpSubTopic
specifies the color and attribute settings for topic words or phrases in the HELP system. The default is DmBlack.

SAS.cparmInfo
specifies the color and attribute settings for text that is displayed in a window as an aid to the user, for example:
Press Enter to continue
The default is DmBlack.

SAS.cparmLabel
specifies the color and attribute settings for text that precedes a widget. For example, the text Name: in the following example is a label:
Name: ___________________
The default is DmBlack.

SAS.cparmMark
specifies the color and attribute settings for areas that have been selected for operations such as FIND, CUT, and COPY. The default is DmBlack/DmReverse.

SAS.cparmMessage
specifies the color and attribute settings for the message field. The default is DmRed.

SAS.cparmNote
specifies the color and attribute settings for NOTE: lines that are written to the Log window or the Output window. The default is DmBlue.

SAS.cparmNumber
specifies the color and attribute settings for line numbers. The default is DmBlue.

SAS.cparmSecondaryBackground
specifies the color and attribute settings for backgrounds in secondary windows. Secondary windows are dialog boxes or requestor windows that prompt the user. The default is DmGray.

SAS.cparmSecondaryBorder
specifies the color and attribute settings for the border of a secondary window. The default is DmBlack.

SAS.cparmSource
specifies the color and attribute settings for SAS source lines that are written to the Log window. The default is DmBlack.

SAS.cparmText
specifies the color and attribute settings for 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. The default is DmBlue.

SAS.cparmTitle
specifies the color and attribute settings for TITLE lines written to the Output window. The default is DmBlue.

SAS.cparmWarning
specifies the color and attribute settings for WARNING lines written to the Log window or the Output window. The default is DmGreen.

SAS CPARMS Resources lists the resource name, SASCOLOR window element, class name, and default for each CPARMS resource. All the 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 SASCOLOR Window Element Class Name Default Color
SAS.cparmBackground Background CparmBackground DmWhite
SAS.cparmBanner Banner CparmForeground DmBlack
SAS.cparmBorder Border CparmBackground DmBlack
SAS.cparmByline Byline CparmForeground DmBlue
SAS.cparmColumn Column Label CparmForeground DmBlue/ Underline
SAS.cparmCommand Command CparmForeground DmBlack
SAS.cparmData Data CparmForeground DmBlack
SAS.cparmError Error CparmForeground DmRed
SAS.cparmFootnote Footnote CparmForeground DmBlue
SAS.cparmForeground Foreground CparmBackground DmBlack
SAS.cparmHeader Header CparmForeground DmBlue
SAS.cparmHelpLink Help Link CparmForeground DmGreen/ Underline
SAS.cparmHelpMainTopic Help Main Topic CparmForeground DmBlack
SAS.cparmHelpSubTopic Help Subtopic and Syntax CparmForeground DmBlack
SAS.cparmInfo Informational Text CparmForeground DmBlack
SAS.cparmLabel Label CparmForeground DmBlack
SAS.cparmMark Selected Area CparmForeground DmBlack/ DmReverse
SAS.cparmMessage Message CparmForeground DmRed
SAS.cparmNote Note CparmForeground DmBlue
SAS.cparmNumber Line Numbers CparmForeground DmBlue
SAS.cparmSecondaryBackground Secondary Background CparmForeground DmGray
SAS.cparmSecondaryBorder Secondary Border CparmForeground DmBlack
SAS.cparmSource Source CparmForeground DmBlack
SAS.cparmText Row Label CparmForeground DmBlue
SAS.cparmTitle Title CparmForeground DmBlue
SAS.cparmWarning Warning CparmForeground DmGreen


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 rubberbanding and dragging rectangles in SAS/INSIGHT software, you may 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 may 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.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.