SUPPORT > TIPS
Send us a question or comment

   

Overview of Color Configuration in SecureCRT®

Note: This tip is for use with SecureCRT version 5.5 and later.

SecureCRT supports two different methods of controlling the color of text displayed in the terminal window:

This tip provides details about these two color configuration methods, including information about how they interact with each other in combination when running SecureCRT version 5.5 and later.

The Question and Answer Section below provides answers to common questions regarding the use of color within SecureCRT.

Color Schemes

Color schemes in SecureCRT are local configuration settings that instruct SecureCRT which foreground and background colors to use for text displayed in the terminal.  These color scheme configurations include a collection of independent foreground and background colors SecureCRT will use for displaying normal, bold, underline, and blink attributes.

All sessions make use of a color scheme to determine initial foreground and background colors. By default, sessions are configured to use the built-in Monochrome color scheme (black text on a white background).

Creating Custom Color Schemes in SecureCRT

To create a custom color scheme in SecureCRT:

  • Press the New... button located in the Terminal / Appearance / Advanced category of the Global Options dialog.
  • Press the Foreground or Background button to choose a color from the Basic colors shown in the color blocks or use the color picker to select the desired color.

Editing Color Schemes in SecureCRT

You can edit custom or built-in schemes via either Global Options or Session Options dialogs in SecureCRT.

In Global Options / Terminal / Appearance / Advanced, choose the desired color scheme from the list, then choose Edit… to edit Foreground/Background colors as explained above in the Creating Custom Color Schemes topic.

As a convenience, color schemes can also be edited within Session Options / Terminal / Appearance by selecting the desired color scheme and pressing the Edit… button.

Note that color schemes in SecureCRT are global, so any changes made to a color scheme within Session Options will be reflected globally in all sessions configured to use that same color scheme.

Applying Color Schemes in SecureCRT

While color schemes are available globally, they can be applied on a per session basis.  There are several ways to apply color schemes to sessions in SecureCRT.

To apply a supplied or custom color scheme to a single session, select it from the Current color scheme dropdown in the Terminal / Appearance category of Session Options.

  • For information on how to apply the same color scheme to all sessions, see the first question and answer below.
  • For information on how to apply the same color scheme to a group of sessions at one time, see the second question and answer below.

Note:  The Global Options / Terminal / Appearance / Advanced category is not the place to choose or select the color scheme to be used by default when new sessions are created.  The default color scheme for new sessions is specified by editing the Default Session, choosing from among the list of available color schemes.

ANSI Color

A remote host (or an application running on the remote host) may send ANSI color escape sequences to specify the foreground and background colors a terminal should use for displaying subsequent text received. Typically ANSI color is comprised of an escape sequence that includes a representation for one or more of 16 unique colors. Eight of the escape sequences correspond to what are called normal colors and the other eight typically correspond to bold (or bright) versions of those colors.
 

A SecureCRT session can be configured to either adhere to or ignore ANSI color codes sent from a remote host by either enabling or disabling the ANSI Color option in the Terminal / Emulation category of the Session Options dialog.

Editing Default ANSI Colors

Depending on the color codes sent by the remote application when ANSI color is in enabled, the default colors may not be ideal for visibility in some situations.  ANSI colors for Normal and Bold attributes can be modified globally in SecureCRT's Global Options

As one example, a remote application might send a color code that causes the default dark blue color to be displayed on a black background, making it difficult to read.  Changing the default Normal dark blue to a lighter shade may make it easier to read on a black background.

Before (Default dark blue is difficult to see):

After (Normal dark blue color changed to a lighter shade of blue):

Combining ANSI Color with a Color Scheme

It is possible to use the ANSI Color functionality in conjunction with a custom or supplied color scheme in SecureCRT versions 5.5 and later.

If SecureCRT receives a normal ANSI color code from the remote host/application, SecureCRT will display the text in the color defined by the applied color scheme.  All other ANSI color codes will result in text being colored according to the ANSI colors defined in Global Options.

In SecureCRT versions prior to 5.5, color schemes are inactive/ignored when the ANSI Color option is enabled in a session's configuration.

Q&A

Q:  How do I apply a specific color scheme to all my existing sessions?

A:  It is possible to apply a color scheme to all existing sessions by editing the Default Session and then applying the color scheme change to all sessions. 

Here are the explicit steps:

  1. Open the main Options menu and choose Global Options…
  2. When the Global Options window appears, select the General / Default Session category and press the Edit Default Settings... button.
  3. Select the Terminal / Appearance category and then specify the color scheme you want to be used for all sessions you have defined.  Note that any changes you make to the Default Session become the default settings for any new sessions created thereafter.
  4. Press the OK button.  You will see the following warning:

If you are certain that you want to make the change to all existing sessions, press the Yes button.


Q:  How do I apply a specific color scheme to only a subset of my sessions?

A:  Rather than applying a change to all sessions, you may want to apply a specific color scheme to only a subset of sessions.  This can be accomplished within SecureCRT's Connect dialog:

  1. Display the Connect dialog by opening SecureCRT's main File menu and choosing Connect...
  2. Hold down the Ctrl key as you left click with the mouse to select any combination of sessions and folders you wish to modify.
  3. Right-click on one of the selected items and choose Properties.
  4. A message will appear letting you know how many sessions are to be modified (if you haven't edited multiple sessions in this way before and haven't chosen to stop displaying the dialog). Press the OK button to continue modifying the sessions' properties.
  5. Select the Terminal / Appearance category and then specify the color scheme you want to be used for the sessions you've selected.
  6. Press the OK button to save the changes to each of the sessions you selected earlier.

Q:  The colors displayed in the terminal window aren't the same as what I have defined in the color scheme I've applied to the session I'm using.  What could be wrong?

A:  It is important to note that color schemes are defined globally (in Global Options), but applied on a per-session basis in the Terminal / Appearance category of the Session Options dialog.

If you have confirmed that the desired color scheme is selected within session options, it is possible that the ANSI Color option in the Terminal / Emulation category of the Session Options dialog is also enabled, but the Use color scheme option is not enabled.  Enable the Use color scheme option to resolve the problem by allowing for the color scheme’s Normal attribute foreground and background colors to be used in place of the ANSI color Normal attribute foreground and background colors.

If after enabling the Use color scheme option you still don't get the colors you want, it indicates that the remote host/application is probably using ANSI color escape sequences that are not applicable to color schemes.  In this case, you'll need to edit the ANSI color choices in Global Options to reflect your preferences for the ANSI color code the remote host/application is sending.


Q:  I've tried all the color schemes that exist in SecureCRT, but none of them really do what I want.  Can I add new color schemes or edit existing color scheme properties?

A:  SecureCRT offers eight predefined color schemes as shown in the Terminal / Appearance / Advanced page of the Global Options dialog.  New color schemes can be added here in the Global Options dialog.  All color schemes can be edited here as well.

Note that since color schemes are defined globally in SecureCRT, any changes made to a color scheme within Session Options will be reflected globally in every session that is also configured to use the same color scheme.


Q:  I have ANSI color enabled (I prefer using ANSI color instead of a color scheme), and I see white text on a black background.   But I want black text on a white background.  How do I configure SecureCRT to display this with ANSI colors?

A:  In the Global Options dialog, select the Terminal / Appearance / ANSI Color category.  The normal foreground ANSI color is displayed/set on the far right of the top row of the Normal colors section.  The normal background ANSI color is displayed/set on the far left of the top row of the Normal colors section.  To edit these two colors, press the color block button and select the new color to use.


Q:  What if I have a color scheme selected and the ANSI Color option both enabled.  What happens?

A:  In current versions of SecureCRT, color schemes and ANSI color work together if the Use color scheme option is enabled along with the ANSI Color option in the Session Options dialog.


Q:  I'm having trouble getting colors to display in remote applications (e.g. syntax highlighting in vi/vim).  What can I do?

A:  There is no universal solution, but there are a couple of generalizations that can be made:

  • Remote applications like vi/vim/emacs will typically send ANSI color codes only to terminals that advertise themselves as "xterm" or an Xterm variant such as "xterm-color".  If you're using the VT100 emulation in SecureCRT, remote applications like vi/vim/emacs may not send ANSI color codes.
  • Solution:
    Set terminal emulation in SecureCRT to Xterm and reconnect to the remote host.  Note: SecureCRT doesn't care what terminal it is currently configured to emulate.  As long as the ANSI Color option is enabled, if SecureCRT receives an ANSI color escape sequence, it will use it (unless the color scheme overrides that particular color code).

    Alternate Solution:
    Set the Terminal type to xterm or xterm-color in the Terminal / Emulation / Advanced category of the Session Options dialog; disconnect and then reconnect in order for the new advertised terminal type to be seen by the remote system.

  • If a remote is sending ANSI color codes, but they're not displayed within the terminal window in SecureCRT, that’s a strong indication that the ANSI Color option is currently disabled.
  • Solution:
    Enable the ANSI Color option in the Terminal / Emulation category of the Session Options dialog.


Q:  Is ANSI emulation the same as ANSI color?

A:  No, they are completely distinct. If the ANSI Color option is disabled, ANSI color sequences will be ignored even if the ANSI emulation is being used.

Was this information helpful?
Yes No
Thank you!
Send your comments and questions to VanDyke Software Support,
or join the discussion in the VanDyke Software Forums.
Can't find the answer you're looking for?
Ask VanDyke Software Support directly
and we will get back to you as soon as possible.
1.  Read or download one of our secure solutions white papers. 2.  Download a free
30-day evaluation copy of our products.
3.  Let us help define the right Secure Shell solution for your company. 4.  Subscribe to our What's New page for tips, solution ideas, and product news.