Skip to content

Color

Assigning custom colors to your connections in DBCode helps you visually separate environments like development, staging, and production.

  1. Open DBCode in Visual Studio Code:

    • Select the DBCode icon in the Activity Bar.
  2. Select the Connection:

    • In the DBCode Explorer, locate the connection you want to color.
  3. Set a Connection Color:

    • Right-click the connection and choose Edit Connection from the context menu.

    • In the Edit Connection tab, use the color swatch next to Connection name to choose a color.

    • Select Save connection to apply the color.

    Setting a connection color

After saving, the selected color appears in these places by default:

  • The connection item in the DBCode Explorer. DBCode colors the connection name and status indicators, like the default marker and connected indicator, while leaving the main database icon unchanged.
  • Primary key indicators for tables in that connection.
  • Editor tabs associated with the connection.
  • SQL file headers associated with the connection.

Modifying Color Settings in the Extension Settings

Section titled “Modifying Color Settings in the Extension Settings”

You can choose where DBCode applies connection colors in Visual Studio Code:

  1. Open Settings: Press Cmd+, on macOS or Ctrl+, on Windows and Linux.

  2. Search for DBCode color settings: Search for DBCode connection color.

  3. Configure DBCode color settings: Adjust the DBCode color settings for editor tabs, the status bar, and the command center.

    DBCode color settings

DBCode keeps the selected color for that connection across Visual Studio Code restarts. The extension settings control which VS Code surfaces also use the color.