it2 tab set-color

Set the color of a tab

Synopsis

it2 tab set-color [<tab-id>] [flags]

Description

Set the color of a tab using RGB or hex color formats.

The color can be specified using either:

  • --rgb flag: Comma-separated RGB values (0-255), e.g., "255,0,0" for red
  • --hex flag: Hexadecimal color code, e.g., "#FF0000" or "FF0000"

If no tab ID is provided, the current tab is used.

The color persists across sessions and is stored in the profile.

Note: The profile must have "Use custom tab color" enabled in iTerm2's profile
preferences (Prefs > Profiles > Colors > Tab Color) for the color to be visible.

Options

--format (default "table")

Output format (table|json|yaml|text)

--hex

Hex color (e.g., "#FF0000" or "FF0000")

--rgb

RGB color (e.g., "255,0,0")

--timeout (default "5s")

Command timeout

--url (default "ws://localhost:1912")

iTerm2 WebSocket URL

See Also