Created
March 22, 2016 14:18
-
-
Save aaronjensen/db5eb0b7ba3679971fa2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftheme monokai "The Monokai colour theme") | |
(defgroup monokai nil | |
"Monokai theme options. | |
The theme has to be reloaded after changing anything in this group." | |
:group 'faces) | |
(defcustom monokai-distinct-fringe-background nil | |
"Make the fringe background different from the normal background color. | |
Also affects 'linum-mode' background." | |
:type 'boolean | |
:group 'monokai) | |
(defcustom monokai-use-variable-pitch t | |
"Use variable pitch face for some headings and titles." | |
:type 'boolean | |
:group 'monokai) | |
(defcustom monokai-high-contrast-mode-line nil | |
"Make the active/inactive mode line stand out more." | |
:type 'boolean | |
:group 'monokai) | |
(let* ((class '((class color) (min-colors 257))) | |
;; Primary colors | |
(yellow "#E6DB74") | |
(orange "#FD971F") | |
(red "#F92672") | |
(magenta "#FD5FF0") | |
(violet "#AE81FF") | |
(blue "#66D9EF") | |
(cyan "#A1EFE4") | |
(green "#A6E22E") | |
(gray "#474747") | |
;; Darker and lighter accented colors | |
(yellow-d "#968B26") | |
(yellow-l "#F3EA98") | |
(orange-d "#A45E0A") | |
(orange-l "#FEB257") | |
(red-d "#A20C41") | |
(red-l "#FC5C94") | |
(magenta-d "#A41F99") | |
(magenta-l "#FE87F4") | |
(violet-d "#562AA6") | |
(violet-l "#C2A1FF") | |
(blue-d "#21889B") | |
(blue-l "#8DE6F7") | |
(cyan-d "#349B8D") | |
(cyan-l "#BBF7EF") | |
(green-d "#67930F") | |
(green-l "#C1F161") | |
(gray-d "#333333") | |
(gray-l "#6b6b6b") | |
;; Adaptive colors | |
(monokai-fg "#F8F8F2") | |
(monokai-bg "#272822") | |
(monokai-hl "#3E3D31") | |
(monokai-hl-line "#49483E") | |
(monokai-emph "#F8F8F0") | |
(monokai-comments "#75715E") | |
;; Adaptive higher/lower contrast accented colors | |
(monokai-fg-hc "#141414") | |
(monokai-fg-lc "#171A0B") | |
;; High contrast colors | |
(yellow-hc yellow-l) | |
(yellow-lc yellow-d) | |
(orange-hc orange-l) | |
(orange-lc orange-d) | |
(red-hc red-l) | |
(red-lc red-d) | |
(magenta-hc magenta-l) | |
(magenta-lc magenta-d) | |
(violet-hc violet-l) | |
(violet-lc violet-d) | |
(blue-hc blue-l) | |
(blue-lc blue-d) | |
(cyan-hc cyan-l) | |
(cyan-lc cyan-d) | |
(green-hc green-l) | |
(green-lc green-d) | |
;; customize based face properties | |
(s-variable-pitch (if monokai-use-variable-pitch | |
'variable-pitch 'default)) | |
(s-fringe-bg (if monokai-distinct-fringe-background | |
monokai-hl monokai-bg)) | |
(s-mode-line-fg (if monokai-high-contrast-mode-line | |
monokai-bg monokai-fg)) | |
(s-mode-line-bg (if monokai-high-contrast-mode-line | |
monokai-fg monokai-hl)) | |
(s-mode-line-buffer-id-fg (if monokai-high-contrast-mode-line | |
'unspecified green)) | |
(s-mode-line-inactive-fg (if monokai-high-contrast-mode-line | |
monokai-fg monokai-comments)) | |
(s-mode-line-inactive-bg (if monokai-high-contrast-mode-line | |
gray-l monokai-bg)) | |
(s-mode-line-inactive-bc (if monokai-high-contrast-mode-line | |
monokai-fg monokai-hl)) | |
;; powerline | |
(s-powerline-active1-bg (if monokai-high-contrast-mode-line | |
gray-l gray)) | |
(s-powerline-active2-bg (if monokai-high-contrast-mode-line | |
gray gray-l)) | |
(s-powerline-inactive1-bg (if monokai-high-contrast-mode-line | |
gray gray-d)) | |
(s-powerline-inactive2-bg (if monokai-high-contrast-mode-line | |
monokai-bg gray)) | |
;; Definitions for terminals that do not support 256 colors | |
(terminal-class '((class color) (min-colors 89))) | |
;; Primary colors | |
(terminal-yellow "#CDC673") | |
(terminal-orange "#FF8C00") | |
(terminal-red "#FF1493") | |
(terminal-magenta "#D700D7") | |
(terminal-violet "#AF87FF") | |
(terminal-blue "#5FD7FF") | |
(terminal-cyan "#5FFFFF") | |
(terminal-green "#87D700") | |
(terminal-gray "#444444") | |
;; Darker and lighter accented colors | |
(terminal-yellow-d "#878700") | |
(terminal-yellow-l "#FFFF87") | |
(terminal-orange-d "#AF5F00") | |
(terminal-orange-l "#FFAF5F") | |
(terminal-red-d "#870000") | |
(terminal-red-l "#FF5F87") | |
(terminal-magenta-d "#AF0087") | |
(terminal-magenta-l "#FF87DF") | |
(terminal-violet-d "#5F00AF") | |
(terminal-violet-l "#AF87D7") | |
(terminal-blue-d "#008787") | |
(terminal-blue-l "#87D7FF") | |
(terminal-cyan-d "#5FAFAF") | |
(terminal-cyan-l "#AFFFFF") | |
(terminal-green-d "#5F8700") | |
(terminal-green-l "#AFD700") | |
(terminal-gray-d "#3A3A3A") | |
(terminal-gray-l "#6C6C6C") | |
;; Adaptive colors | |
(terminal-monokai-fg "#F5F5F5") | |
(terminal-monokai-bg "#1B1E1C") | |
(terminal-monokai-hl-line "#212121") | |
(terminal-monokai-hl "#303030") | |
(terminal-monokai-emph "#FFFAFA") | |
(terminal-monokai-comments "#8B8878") | |
;; Adaptive higher/lower contrast accented colors | |
(terminal-monokai-fg-hc "#171A0B") | |
(terminal-monokai-fg-lc "#141414") | |
;; High contrast colors | |
(terminal-yellow-hc terminal-yellow-d) | |
(terminal-yellow-lc terminal-yellow-l) | |
(terminal-orange-hc terminal-orange-d) | |
(terminal-orange-lc terminal-orange-l) | |
(terminal-red-hc terminal-red-d) | |
(terminal-red-lc terminal-red-l) | |
(terminal-magenta-hc terminal-magenta-d) | |
(terminal-magenta-lc terminal-magenta-l) | |
(terminal-violet-hc terminal-violet-d) | |
(terminal-violet-lc terminal-violet-l) | |
(terminal-blue-hc terminal-blue-d) | |
(terminal-blue-lc terminal-blue-l) | |
(terminal-cyan-hc terminal-cyan-d) | |
(terminal-cyan-lc terminal-cyan-l) | |
(terminal-green-hc terminal-green-d) | |
(terminal-green-lc terminal-green-l) | |
;; customize based face properties | |
(terminal-s-variable-pitch (if monokai-use-variable-pitch | |
'variable-pitch 'default)) | |
(terminal-s-fringe-bg (if monokai-distinct-fringe-background | |
terminal-monokai-hl terminal-monokai-bg)) | |
(terminal-s-mode-line-fg (if monokai-high-contrast-mode-line | |
terminal-monokai-bg terminal-monokai-fg)) | |
(terminal-s-mode-line-bg (if monokai-high-contrast-mode-line | |
terminal-monokai-fg terminal-monokai-hl)) | |
(terminal-s-mode-line-buffer-id-fg (if monokai-high-contrast-mode-line | |
'unspecified terminal-green)) | |
(terminal-s-mode-line-inactive-fg (if monokai-high-contrast-mode-line | |
terminal-monokai-fg terminal-monokai-comments)) | |
(terminal-s-mode-line-inactive-bg (if monokai-high-contrast-mode-line | |
terminal-monokai-hl-line terminal-monokai-bg)) | |
(terminal-s-mode-line-inactive-bc (if monokai-high-contrast-mode-line | |
terminal-monokai-fg terminal-monokai-hl))) | |
;; Define faces | |
(custom-theme-set-faces | |
'monokai | |
`(header-line | |
((,class (:inverse-video unspecified | |
:underline unspecified | |
:foreground ,monokai-emph | |
:background ,monokai-hl | |
:box (:line-width 1 | |
:color ,monokai-hl | |
:style unspecified))) | |
(,terminal-class (:inverse-video unspecified | |
:underline unspecified | |
:foreground ,terminal-monokai-emph | |
:background ,terminal-monokai-hl | |
:box (:line-width 1 | |
:color ,terminal-monokai-hl | |
:style unspecified))))) | |
) | |
) | |
;;;###autoload | |
(when (and (boundp 'custom-theme-load-path) load-file-name) | |
(add-to-list 'custom-theme-load-path | |
(file-name-as-directory (file-name-directory load-file-name)))) | |
(provide-theme 'monokai) | |
;;; monokai-theme.el ends here | |
(defface helm-header-line-left-margin | |
'((t (:foreground "black" :background "yellow"))) | |
"Face used to highlight helm-header sign in left-margin." | |
:group 'helm-faces) | |
(setq header-line-format #(" " 0 1 (display #("->" 0 2 (face helm-header-line-left-margin))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment