Sign up ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

While it's great that Terminal now has built-in support for changing the ANSI colors, I find it annoying that it automatically adjusts the colors to improve contrast, which means the colors that I actually pick often end up washed out or off in some other way. Here's a screenshot explaining the problem:

screenshot of OS X color settings

This bugs me because I like to use the same color scheme in Terminal and MacVim, and with this handling of colors by Terminal, they don't match up to the ones in MacVim.

Does anyone know of a solution to this, besides switching to iTerm 2 (which I'd rather not – I like the rest of Terminal, especially some GUI touches like the pulsating visual bell). Thanks!

share|improve this question
Good question – adjustments also seem to be made for window transparency, never mind sub pixel rendering… – kopischke Oct 28 '11 at 9:25
@kopischke, the minimum-contrast adjustment does not take into account the background color opacity, if that's what you mean. – Chris Page Nov 8 '11 at 9:14
It would help if you posted a screenshot showing the expected colors on a black background. Numbers aside, I can't really see a difference between the color swatches in the preferences window and the text colors in the terminal in your screenshot, so it's hard to tell how significant the difference is. – Chris Page Nov 8 '11 at 9:15

5 Answers 5

up vote 15 down vote accepted

Here's the trick that you need to know: Values set via RGB get mangled, those set via HSB do not.

I had a similar problem using the (great) Solarized color scheme: MacVim had a darker (and correct) background color than Terminal, even though I was setting all of the correct RGB values per the Solarized spec. See here:

Basically you need to know what your color values are supposed to be for each of the Terminal ANSI, text, and Background (note this one is on the Window tab) colors and then set them via the HSB picker instead of RGB. See this example:

For whatever reason (I suspect some type of profile thing, or perhaps a contrast tweak as you suggest), the RGB color you enter is not what you get. You'll also notice that once you've set the values via HSB, switching to the RGB picker will show options different than you'd expect. The Solarized value conversions all agree according to Photoshop; it seems to be something that the Apple color picker is doing for you.

share|improve this answer
This is an unbelievably good answer. – Jason Salaz Mar 14 '12 at 16:52
Looks like RGB isn't mangled as such, just modified by the pickers opacity settings as per the answer by @eirnym - combination of the 2 not only explains it, but solves it in 2 ways. Great! – stuffe Mar 17 '12 at 0:07
Not to rain on the parade, but I can’t confirm this fixes the issue – keeps modifying values I input in HSB color space, even when setting the background to the correct values (including opacity 100 % and blur 0 %) first. Bright values seem to be less prone to this, the non-bright more so. Maybe the color picker in is seriously buggy, maybe it tries to be “smart” about contrast and color range (I wouldn’t put either past Apple) – be it as it may, the solution above does not work on my system. – kopischke Mar 31 '12 at 23:05
… investigating some more, the issue seems to be rooted in the mapping of Solarized colors from device independent (LAB / HSB color space) to device dependent color space (RGB). Consistent results can be achieved when selecting HSB color space, as shown above, but only when also expressly mapping to device RGB (in the drop down menu behind the tiny arrow on the small color square left of the color space dropdown). Differences in the RGB values to the Solarized color tables are explained by the fact Solarized maps to sRGB, while the color picker always implicitly maps to device RGB. – kopischke Mar 31 '12 at 23:45
… which goes to tell the OS X color picker has been designed for people who actually know what this color space stuff is about (i.e. graphic designers), not us Terminal grunts :). [yeah, OT, I know] – kopischke Mar 31 '12 at 23:46

choosing 'Device RGB' from the Apple Color Picker swatch dropdown

  1. Open the color picker
  2. Choose the sliders tab
  3. Click on the swatch below the magnifying glass, to the left of the slider dropdown
  4. Choose Device RGB

Now colors specified by hex value will not be subjected to color space conversion.


share|improve this answer
Cool - thanks for this! For all of Apple's design prowess, it is totally non-obvious that clicking on this would reveal a menu. – Ryan Dlugosz Apr 22 '12 at 12:39
Note: if this workaround of using colors with different color spaces works, it's likely relying upon a bug in the color-handling code, which is supposed to work with any color, and may stop working in the future when that bug is fixed. – Chris Page Nov 17 at 22:32

Color profiles are definitely important, but there's another issue lurking here: automatically brightens any color when displayed over the default background. Here, for example, are the colors output by running the Solarized color theme, as measured with DigitalColor Meter in sRGB mode, and compared against the canonical Solarized sRGB values.

When presented over a black (or any other color) background, produces approximately the correct colors; however, on the default background, all colors except the default and default bold text are substantially too bright.

a color test in Colors are as expected when presented over colored backgrounds, but brightened when presented over the default background.

share|improve this answer
Down-voted because this isn't an answer. It seems to be a comment about the question. – Chris Page Nov 17 at 22:31

Open Window settings for your theme, toggle background color, set blur to 0% and Opacity to 100%. After this your colors will be same as you want. Also you should check every color you pick for text for this parameters.

enter image description here

share|improve this answer
Down-voted because this doesn't apply to the question, which is about Terminal's minimum-contrast behavior and is unaffected by the background opacity. – Chris Page Nov 17 at 22:33

In short: no, there's no supported means to disable this.

Terminal automatically applies a minimum contrast when displaying an ANSI (or extended 256-color table) color on the terminal background color, or when displaying the terminal foreground/text color on an ANSI background color.

This is meant to be a convenience, so that one can set a background or foreground color and have them contrast with the ANSI colors without having to adjust all the ANSI colors. This was especially important in earlier versions of Terminal, which lacked Preferences support for customizing the ANSI colors.

Older versions of Terminal applied the minimum-contrast for all color combinations, but that meant that, e.g., ANSI red-on-red text could be readable, but some programs intentionally display text with the same foreground and background color in order to hide it (for displaying game hints or joke punchlines, for example). Because of that, newer versions of Terminal do not apply the minimum-contrast when displaying one ANSI color upon another.

Now, rather than just address the same-color case, Terminal avoids applying the minimum-contrast for all combinations of ANSI colors, because it is assumed that if the user customizes any ANSI colors they will customize them all to contrast with each other as desired. It is also assumed that those users will adjust or take into account the terminal background and foreground colors to fit their desired color scheme.

If the workaround of using colors with different color spaces—suggested in other answer(s)—works, it's likely relying upon a bug in the color-handling code, which is supposed to work with any color, and may stop working in the future when that bug is fixed.

If being able to explicitly disable or adjust the minimum-contrast behavior is important to you, I recommend letting Apple know by filing a report at using any Apple ID.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.