-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separator color comes out wrong #99
Comments
Please post your Emacs info from
|
GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org |
|
This happens to me when I have transparency enabled with iTerm on OS X. Disabling transparency fixed it for me :) |
Hmm, I'm using the build from emacsformacosx.com, no iTerm. |
Use the setting I provided. It's an issue with SRGB and pixmap rendering (which doesn't use a colorspace) |
Sorry, missed your comment. That worked perfectly, thanks a lot for the help! |
Also an interesting point to make is that, after loading your config with |
Hi, I was looking super quickly at how the separators are being generated and they are done programmatically. The target rendering colourspace is know, i.e. sRGB, and the pixmap rendering path is known, I'm unclear on the reasons behind the discrepancies in colour rendering of those elements, especially if the input colours of both rendering paths are known. There should be a way to reconcile them to match gracefully instead of deactivating sRGB support. Cheers, Thomas |
I just came across this related post: http://emacsredux.com/blog/2014/01/11/a-peek-at-emacs-24-dot-4-srgb-colours-on-os-x/, which lead me to that thread: http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-05/msg00077.html |
Interesting discovery that one, @KelSolaar. Looking at the latest version of /* ==========================================================================
NSColor, EmacsColor category.
========================================================================== */
@implementation NSColor (EmacsColor)
+ (NSColor *)colorForEmacsRed:(CGFloat)red green:(CGFloat)green
blue:(CGFloat)blue alpha:(CGFloat)alpha
{
#if defined (NS_IMPL_COCOA) \
&& MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if (ns_use_srgb_colorspace
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
&& [NSColor respondsToSelector:
@selector(colorWithSRGBRed:green:blue:alpha:)]
#endif
)
return [NSColor colorWithSRGBRed: red
green: green
blue: blue
alpha: alpha];
#endif
return [NSColor colorWithCalibratedRed: red
green: green
blue: blue
alpha: alpha];
}
- (NSColor *)colorUsingDefaultColorSpace
{
/* FIXMES: We're checking for colorWithSRGBRed here so this will
only work in the same place as in the method above. It should
really be a check whether we're on macOS 10.7 or above. */
#if defined (NS_IMPL_COCOA) \
&& MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if (ns_use_srgb_colorspace
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
&& [NSColor respondsToSelector:
@selector(colorWithSRGBRed:green:blue:alpha:)]
#endif
)
return [self colorUsingColorSpace: [NSColorSpace sRGBColorSpace]];
#endif
return [self colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
}
@end This explains why @jasonm23's suggestion hides the symptom. It also shows that it will depend on how your Emacs executable was compiled. It would thus be interesting to hear from someone who has compiled their Emacs with both, |
For others reading |
Bummer! Why didn't I figure that one out myself? Too obvious, probably... 😞 |
Until now I've been happy with the default 'arrow setting. However, on the Macbook Pro, I'm seeing the effect mentioned in this issue: milkypostman/powerline#99 Thing is, this is with a setup that already has, and has had for a long time, ns-use-srgb-colorspace set to nil. Using the utf-8 version seems to make things look a lot more tidy. I might need to see if this works fine everywhere else (especially GNU/Linux and Windows), but I'm going with this for now.
When I adjust the color of various parts of the mode-line, the colors of the separators don't match up perfectly. It seems as if they are always a bit too bright..?
Leads to the following look:
The text was updated successfully, but these errors were encountered: