

For most terminal emulators, the colors can be easily modified to taste by the user.It will work "everywhere" (older machines, misconfigured terminals).%F changes the foreground color.Īlthough most terminals support 256 colors there are still quite a few themes that only utilize (the first) 16 colors.

Print -P interprets the string like it would be in the prompt. (You can check this with for a in light blue' According to this Gist iTerm2 already supports this in the beta builds. There is even growing support for 24bit true color. Aside from the first 16 colors these colors seem to be the same for most terminal emulators (See my answer on a question regarding this on SO for more details). Many (if not most) modern terminal emulators support a 256 color palette, which consists of the 16 colors mentioned above, 216 colors on a 6圆圆 RGB color cube and 32 grayscale colors. Most terminal emulators allow for these 16 colors to be freely configured by the user (Have a look at the Colors tab in the iTerm preferences). (For examples have a look at the Colors section on the Wikipedia page on ANSI escape code). While the names are well defined, the exact color values are not and vary greatly even in the default settings for different terminals. They also have names, with the codes n and n+8 sharing the same name:
#ITERM COLOR THEMES CODE#
They are assigned the code 0 to 7 and 8 to 15, respectively. "Traditionally" there have been 16 colors: 8 Normal and 8 Light/Bright.

The terminal or terminal emulator, in your case iTerm2ĭepending on the terminal only a limited color palette is supported. There are two layers of settings/themes at work here:
