Emacs主题颜色是错误的

时间:2015-08-04 16:49:30

标签: emacs archlinux

我在ArchLinux上使用KDE5等离子(微风主题)。 我安装了Emacs并希望获得atom.io主题,如下所示: GitHub

颜色应该是: Theme Preview

现在这里有一个截图我的颜色看起来如何: My Emacs

我也安装了atom.io,样本预览正确。这是我的atom.io截图: my atom.io shot

最后,我的.emacs配置文件:

(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)
(load-theme 'atom-one-dark t)
(require 'powerline)
(powerline-default-theme)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-safe-themes
   (quote
    ("90d329edc17c6f4e43dbc67709067ccd6c0a3caa355f305de2041755986548f2" "b9c57187960682d4$
 '(desktop-save-mode 1)
 '(global-hl-line-mode 1)
 '(global-linum-mode 1))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

为什么Emacs的颜色不同? 这可能是因为我的颜色设置错误了吗?或者为什么会出错?

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,对Mac用户来说似乎很常见。 我在类似主题的{GitHub页面上的问题部分dracula找到了一些帮助。我按照apierz的修正来纠正终端上的颜色。

通过比较吸血鬼主题代码和原子主题,您可以看到两个主题都使用了十六进制颜色的背景#282 *。基本上我们需要将背景的十六进制颜色更改为更兼容的颜色。

nil文件中注释掉这一行代码,然后再添加一个颜色值为;;; Code: (deftheme atom-one-dark "Atom One Dark - An Emacs port of the Atom One Dark theme from Atom.io.") (defvar atom-one-dark-colors-alist '(("atom-one-dark-accent" . "#528BFF") ("atom-one-dark-fg" . "#ABB2BF") ;; ("atom-one-dark-bg" . "#282C34") ("atom-one-dark-bg" . nil 的代码。

folder/messageoutput.html?t=Text%20to%20display

这会使您的背景颜色与终端窗口相同。由于我的背景颜色与#282C34相似,因此最终看起来很像Atom One Dark Theme。

或者,你可以将背景颜色设置为#000000(黑色),但是我没有发现它看起来太有吸引力了。

向最初在GitHub上发布修复的apierz致敬!

what_it_should_look_like.png