iTerm2: How to change the color used to highlight search results?

It seems that iTerm2 is hardcoded to highlight search results using a yellow background color. I tried both the latest release and the nightlies but could not find a way to change that color.

Did I miss something? It seems implausible to me, that a terminal emulator with such a degree of customizability would really hardcode a single color while at the same time making virtually everything else user-configurable.

For clarification, here's a screenshot: enter image description here As you can see, I searched the screen contents for the word "stack" and all its occurrences are highlighted in yellow (except for the selected one).


Solution 1:

For iTerm2 Text color changes:

  1. From the menus choose Profiles → Open Profiles.
  2. Click the Edit Profiles button, then the Colors tabs.

  3. You can change the colors by clicking on the color wells.

You can find iTerm color schemes at iterm2colorschemes.com.

Solution 2:

Unfortunately, the yellow color is actually hardcoded in the source code and cannot be configured in the preferences.

Here is the corresponding code snippet where the color is applied:

 if (isMatch && !bgselected) {
     aColor = [NSColor colorWithCalibratedRed:1 green:1 blue:0 alpha:1];
 } else ...

Source: https://github.com/gnachman/iTerm2/blob/3a99bb0a0e5924e2d515ec9638a4ffa6731a5682/sources/PTYTextView.m#L6274