VanDyke Software

Tips

Index

Overview of Color Configuration in SecureCRT®

Note: This tip is for use with SecureCRT version 8.3 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.

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 Solarized Light color scheme.

Screenshot of Session Options default color scheme, Solarized Light

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.
Screenshot of Attributes dialog displayed when creating a new custom color scheme

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, which is specified by the Color Mode option in the Terminal / Emulation category of the Session Options dialog. ANSI colors are disabled when None is selected as the Color Mode option.

Screenshot showing Color Mode 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 purple color to be displayed on a light background, making it difficult to read.  Changing the default Bold purple to a brighter shade may make it easier to read on a light background.

Before (Default purple is difficult to see):

Screenshot showing example of a default light purple ANSI color that is difficult to see (before)

After (Default purple color changed to a brighter shade of purple):

Screenshot showing example of a default ANSI color that has been changed to a brighter, bold purple for improved visibility (after)

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.

Question and Answer

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. Open the Session Manager.
  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 over 20 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 Color Mode 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 Color Mode 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 Color Mode option is not set to None, 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 Color Mode option is currently set to None.
  • Solution:
    Enable the ANSI Color option in the Terminal / Emulation category of the Session Options dialog.


Q:  How do I tell what terminal type the remote system is using?

A:  echo $TERM

     Even though SecureCRT may be configured with the Xterm emulation, the remote profile may have instructions which hard code the terminal type to something other than what you have configured in SecureCRT. To check which terminal type the remote system is using, issue the echo $TERM command within the remote shell.

     Additionally, some remote apps have configuration files which may alter or hard code the terminal type to be something that can prevent SecureCRT from receiving ANSI color sequences.


Q:  Is ANSI emulation the same as ANSI color?

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

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.