简体   繁体   English

Emacs 22和Emacs 23之间的颜色差异

[英]Color discrepancy between Emacs 22 and Emacs 23

If .emacs contains the following two lines 如果.emacs包含以下两行

(set-face-foreground 'modeline "#000000") 
(set-face-background 'modeline "#00FFFF") 

then Emacs 22 correctly uses color #00FFFF (cyan), but Emacs 23 uses a different shade of blue (#90FBFE). 那么Emacs 22正确使用颜色#00FFFF(青色),但是Emacs 23使用不同的蓝色阴影(#90FBFE)。

What is happening? 怎么了?

An image will illustrate the problem, but because I'm a new user here, stackoverflow will not let me save an image. 图像将说明问题,但是由于我是这里的新用户,所以stackoverflow不会让我保存图像。 In the meantime, here is the image hosted elsewhere: http://postimage.org/image/1j2ya1ddw/ 同时,这是在其他地方托管的图像: http : //postimage.org/image/1j2ya1ddw/

Version 23 on OS X uses the new Cocoa front-end, and the colors are rendered incorrectly both in that version and in the current dev Emacs. OS X上的版本23使用了新的Cocoa前端,并且该版本和当前的dev Emacs中的颜色显示均不正确。 I opened a bug for this last week , having been working on a color theme using precisely-selected colors, and the developers appear to be in the process of accepting the bug's validity. 上周 ,我打开了一个bug ,一直在使用精确选择的颜色来设计颜色主题,并且开发人员似乎正在接受bug的有效性。

For me this two lines do their job, but if I set an alpha parameter of a selected frame then colors change similar. 对我来说,这两行可以完成工作,但是如果我为所选帧设置了alpha参数,则颜色会发生类似变化。 I've looked at the emacs 22.3 manual and found nothing about the alpha parameter. 我看了emacs 22.3手册,却没有发现有关alpha参数的任何信息。 But if you look at the 23.3 manual you could find this phrase in the `alpha' parameter section: 但是,如果您查看23.3手册 ,则可以在“ alpha”参数部分中找到以下短语:

It can also have a `nil' value, which tells Emacs not to set the frame opacity (leaving it to the window manager). 它也可以有一个'nil'值,告诉Emacs不要设置框架的不透明度(将其保留给窗口管理器)。

Maybe your window manager changes the colors of a frame? 也许您的窗口管理器会更改框架的颜色? If it so this line of code can help you: 如果是这样,此行代码可以帮助您:

 (set-frame-parameter (selected-frame) 'alpha 100)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM