Customizing the SAS Windowing Environment |
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:
Through the SASCOLOR window, as described in Customizing Colors Using the SASCOLOR Window. You can customize any window element for most SAS windows with the SASCOLOR window.
With the COLOR command using the following syntax:
color field-type <color | NEXT <highlight>>For a complete description of the COLOR command, see COLOR Command: OpenVMS. The COLOR command affects only the specified element of the active window. Changes made with the COLOR command override changes entered through any of the other methods described here. To save your changes beyond your current session, do one of the following:
Issue the WSAVE command. The changes are saved to SASUSER.PROFILE.window.WSAVE.
Note: Issuing the WSAVE ALL command will save all windows that support the WSAVE command.
The WSAVE command is not available for all SAS windows. For example, with SAS/FSP software, changes are saved either through the EDPARMS or the PARMS window. To determine whether WSAVE is available for a SAS window that is not part of the SAS windowing environment, see the product documentation.
Both the COLOR command and the WSAVE command override actions in the SASCOLOR window. That is, COLOR and WSAVE override the use of CPARMS colors for that particular window without affecting the CPARMS values for other SAS windows.
By entering the color resource specifications yourself. You can enter specific RGB values or color names for any of the X resources that control color. For more information, see Defining Color Resources.
Customizing Colors 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, complete the following steps:
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.
For more information about the SASCOLOR window, see the Base SAS section in the online SAS Help and Documentation.
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:
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.
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
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:
specifies the color for the foreground system color in the SASCOLOR window.
specifies the color for the background system color the SASCOLOR window.
sets the system secondary background color and specifies the color for the secondary background system color in the SASCOLOR window.
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.
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 |
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.
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 |
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
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:
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.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.