Wc3270/Colors

From The x3270 Wiki

wc3270 colors are configured by resources and by the Colors properties of the Windows Console that it runs on.

The resources map host colors to Windows Console colors. Windows console colors do not have names; they are just enumerated 0 through 15.

To change how a particular host color is displayed, you can change the mapping of a host color to a Windows Console color, or you can change the RGB values that define how a particular console color is displayed, or both.

Resources

There are two sets of resources that control color mapping.

The first are used when the host does not specify a color for a particular field. In that case, the color is determined by the field attributes:

Protected Intensified Resource
Yes Yes hostColorForProtectedIntensified resource
Yes No hostColorForProtected resource
No Yes hostColorForIntensified resource
No No hostColorForDefault resource

The value for each of the above resources is a host color. The mapping of host colors to Windows Console colors is defined by these resources, which are also used to control how explicitly-specified host colors are displayed:

Host color Resource Alternate Resource
Neutral Black consoleColorForHostColorNeutralBlack resource consoleColorForHostColor0 resource
Blue consoleColorForHostColorBlue resource consoleColorForHostColor1 resource
Red consoleColorForHostColorRed resource consoleColorForHostColor2 resource
Pink consoleColorForHostColorPink resource consoleColorForHostColor3 resource
Green consoleColorForHostColorGreen resource consoleColorForHostColor4 resource
Turquoise consoleColorForHostColorTurquoise resource consoleColorForHostColor5 resource
Yellow consoleColorForHostColorYellow resource consoleColorForHostColor6 resource
Neutral White consoleColorForHostColorNeutralWhite resource consoleColorForHostColor7 resource
Black consoleColorForHostColorBlack resource consoleColorForHostColor8 resource
Deep Blue consoleColorForHostColorDeepBlue resource consoleColorForHostColor9 resource
Orange consoleColorForHostColorOrange resource consoleColorForHostColor10 resource
Purple consoleColorForHostColorPurple resource consoleColorForHostColor11 resource
Pale Green consoleColorForHostColorPaleGreen resource consoleColorForHostColor12 resource
Pale Turquoise consoleColorForHostColorPaleTurquoise resource consoleColorForHostColor13 resource
Gray consoleColorForHostColorGray resource consoleColorForHostColor14 resource
White consoleColorForHostColorWhite resource consoleColorForHostColor15 resource

Colors properties

Windows Consoles can display 16 colors. They are configurable through the Colors tab of the Properties dialog:

  • Click on the terminal icon in the upper-left corner of the wc3270 window.
  • Select Properties.
  • On the dialog, select the Colors tab.

Wc3270-properties.png

Windows console colors do not have names; they are just enumerated 0 through 15 (left to right on the Properties dialog).

To change a console color, do the following steps:

  • Select the Screen Text radio button.
  • Note which color is selected for Screen Text. In the image above, it is color 7 (the 8th color from the left).
  • Select the color that you want to modify.
  • Use the Red, Green and Blue controls to change the color.
  • Re-select the original color for Screen Text that you noted above.
  • Click OK.