├── .gitignore ├── screenshot ├── gnus-dark.png ├── gnus-light.png ├── source-dark.png └── source-light.png ├── README.md ├── COPYING ├── mgl-dark-theme.el ├── mgl-light-theme.el └── color-theme-mgl.el /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /screenshot/gnus-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melisgl/color-theme-mgl/HEAD/screenshot/gnus-dark.png -------------------------------------------------------------------------------- /screenshot/gnus-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melisgl/color-theme-mgl/HEAD/screenshot/gnus-light.png -------------------------------------------------------------------------------- /screenshot/source-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melisgl/color-theme-mgl/HEAD/screenshot/source-dark.png -------------------------------------------------------------------------------- /screenshot/source-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melisgl/color-theme-mgl/HEAD/screenshot/source-light.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Color Theme MGL 2 | 3 | A pair of Emacs 24 color themes: `mgl-light` and `mgl-dark`. They have 4 | fairly extensive coverage of faces including gnus, message, org, erc, 5 | magit and slime. 6 | 7 | ## Links 8 | 9 | See [the repository](https://github.com/melisgl/color-theme-mgl). 10 | 11 | ## License 12 | 13 | MIT 14 | 15 | ## Installation 16 | 17 | Add this to you emacs initalization file: 18 | 19 | (add-to-list 'custom-theme-load-path "/color-theme-mgl/") 20 | (load-theme 'mgl-dark t) 21 | 22 | or 23 | 24 | (load-theme 'mgl-light t) 25 | 26 | ## Screenshots 27 | 28 | The font in the following screenshots is DejaVu Sans Mono-8 on Linux 29 | with hinting turned off. 30 | 31 | ![sources dark](/screenshot/source-dark.png) 32 | ![gnus dark](/screenshot/gnus-dark.png) 33 | ![sources light](/screenshot/source-light.png) 34 | ![gnus light](/screenshot/gnus-light.png) 35 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Gabor Melis 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /mgl-dark-theme.el: -------------------------------------------------------------------------------- 1 | (require 'color-theme-mgl 2 | (concat (file-name-directory load-file-name) "color-theme-mgl.el")) 3 | 4 | (deftheme mgl-dark 5 | "A dark background theme.") 6 | 7 | (let ((background-low (mgl-hsv-to-html 0 0 12)) 8 | (background (mgl-hsv-to-html 0 0 19)) 9 | (background-high-0 (mgl-hsv-to-html 0 0 40)) 10 | (background-high-1 (mgl-hsv-to-html 0 0 51)) 11 | (background-high-2 (mgl-hsv-to-html 0 0 85)) 12 | (alt-background (mgl-hsv-to-html 36 90 90)) 13 | (foreground-low-3 (mgl-hsv-to-html 36 90 166)) 14 | (foreground-low-2 (mgl-hsv-to-html 36 150 190)) 15 | (foreground-low-1 (mgl-hsv-to-html 36 180 210)) 16 | (foreground (mgl-hsv-to-html 36 36 210)) 17 | (foreground-high-1 (mgl-hsv-to-html 36 20 255)) 18 | (2nd-foreground-low-1 (mgl-hsv-to-html 216 146 237)) 19 | (2nd-foreground (mgl-hsv-to-html 216 54 210)) 20 | (2nd-foreground-high-1 (mgl-hsv-to-html 216 30 230)) 21 | (3rd-foreground (mgl-hsv-to-html 70 136 188)) 22 | (dead (mgl-hsv-to-html 0 0 128)) 23 | (red-low-1 (mgl-hsv-to-html 0 162 230)) 24 | (red (mgl-hsv-to-html 0 162 205)) 25 | (red-high-3 (mgl-hsv-to-html 0 162 120)) 26 | (orange (mgl-hsv-to-html 24 255 240)) 27 | (green-low-1 (mgl-hsv-to-html 120 162 195)) 28 | (green (mgl-hsv-to-html 120 162 180)) 29 | (green-high-3 (mgl-hsv-to-html 120 162 70)) 30 | (blue "blue") 31 | (purple "purple") 32 | (white "white")) 33 | (color-theme-mgl 'mgl-dark)) 34 | 35 | (provide-theme 'mgl-dark) 36 | -------------------------------------------------------------------------------- /mgl-light-theme.el: -------------------------------------------------------------------------------- 1 | (require 'color-theme-mgl 2 | (concat (file-name-directory load-file-name) "color-theme-mgl.el")) 3 | 4 | (deftheme mgl-light 5 | "A light background theme.") 6 | 7 | (let ((background-low (mgl-hsv-to-html 36 0 255)) 8 | (background (mgl-hsv-to-html 36 5 250)) 9 | (background-high-0 (mgl-hsv-to-html 36 10 235)) 10 | (background-high-1 (mgl-hsv-to-html 36 40 216)) 11 | (background-high-2 (mgl-hsv-to-html 36 60 180)) 12 | (alt-background (mgl-hsv-to-html 0 0 150)) 13 | (foreground-low-3 (mgl-hsv-to-html 36 150 90)) 14 | (foreground-low-2 (mgl-hsv-to-html 36 200 130)) 15 | (foreground-low-1 (mgl-hsv-to-html 36 255 150)) 16 | (foreground (mgl-hsv-to-html 36 218 40)) 17 | (foreground-high-1 (mgl-hsv-to-html 36 218 0)) 18 | (2nd-foreground-low-1 (mgl-hsv-to-html 216 120 88)) 19 | (2nd-foreground (mgl-hsv-to-html 216 150 150)) 20 | (2nd-foreground-high-1 (mgl-hsv-to-html 216 200 200)) 21 | (3rd-foreground (mgl-hsv-to-html 70 252 79)) 22 | (dead (mgl-hsv-to-html 0 0 176)) 23 | (red-low-1 (mgl-hsv-to-html 0 255 90)) 24 | (red (mgl-hsv-to-html 0 172 125)) 25 | (red-high-3 (mgl-hsv-to-html 0 30 220)) 26 | (orange (mgl-hsv-to-html 24 220 180)) 27 | (green-low-1 (mgl-hsv-to-html 70 252 44)) 28 | (green (mgl-hsv-to-html 70 252 79)) 29 | (green-high-3 (mgl-hsv-to-html 70 40 205)) 30 | (blue "blue") 31 | (purple "purple") 32 | (white "white")) 33 | (color-theme-mgl 'mgl-light)) 34 | 35 | (provide-theme 'mgl-light) 36 | -------------------------------------------------------------------------------- /color-theme-mgl.el: -------------------------------------------------------------------------------- 1 | ;;; color-theme-mgl.el --- Emacs 24 theme based on too many other themes to list 2 | ;;; Author: Gábor Melis 3 | ;;; Url: https://github.com/melisgl/color-theme-mgl 4 | ;;; Version: 20141115.2020 5 | ;;; Package-Requires: ((emacs "24.1")) 6 | 7 | ;;; Changelog: 8 | ;; 9 | ;; 20150317.0213: - initial version 10 | 11 | ;;; License: MIT 12 | 13 | ;;; Commentary: 14 | ;; 15 | ;; To use it, put the following in your Emacs configuration file: 16 | ;; 17 | ;; (add-to-list 'custom-theme-load-path "/color-theme-mgl/") 18 | ;; 19 | ;; (load-theme 'mgl-dark t) 20 | ;; 21 | ;; or 22 | ;; 23 | ;; (load-theme 'mgl-light t) 24 | ;; 25 | ;; Requirements: Emacs 24. 26 | 27 | (unless (>= emacs-major-version 24) 28 | (error "color-theme-mgl requires Emacs 24 or later.")) 29 | 30 | (defun mgl-hsv-to-rgb (h s v) 31 | "Convert HSV color representation to RGB. H is in [0, 360]. S 32 | and V are in [0, 255]." 33 | (let* ((s (/ s 255.0)) 34 | (v (/ v 255.0)) 35 | (c (* s v)) 36 | (h (/ h 60.0)) 37 | (x (* c (- 1 (abs (- (mod h 2) 1))))) 38 | (m (- v c))) 39 | (cond ((and (<= 0 h) (< h 1)) 40 | (list (+ m c) (+ m x) m)) 41 | ((< h 2) 42 | (list (+ m x) (+ m c) m)) 43 | ((< h 3) 44 | (list m (+ m c) (+ m x))) 45 | ((< h 4) 46 | (list m (+ m x) (+ m c))) 47 | ((< h 5) 48 | (list (+ m x) m (+ m c))) 49 | ((< h 6) 50 | (list (+ m c) m (+ m x))) 51 | (t 52 | (error "~S" h))))) 53 | 54 | (defun mgl-rgb-to-html (r g b) 55 | (format "#%02X%02X%02X" (min 255 (* 256 r)) 56 | (min 255 (* 256 g)) (min 255 (* 256 b)))) 57 | 58 | (defun mgl-hsv-to-html (h s v) 59 | (apply #'mgl-rgb-to-html (mgl-hsv-to-rgb h s v))) 60 | 61 | (defun color-theme-mgl (theme-name) 62 | (custom-theme-set-faces 63 | theme-name 64 | ;; basic faces 65 | `(default ((t (:background ,background :foreground ,foreground)))) 66 | `(link ((t (:foreground ,blue :underline t)))) 67 | `(link-visited ((t (:foreground ,purple :underline t)))) 68 | `(header-line ((t (:background ,alt-background :foreground ,foreground)))) 69 | `(highlight ((t (:background ,background-high-2)))) 70 | `(region ((t (:background ,background-high-1)))) 71 | `(secondary-selection ((t (:background ,background-high-0)))) 72 | `(mode-line 73 | ((t (:background ,background-high-0 :foreground ,foreground-low-3 74 | :box nil)))) 75 | `(mode-line-inactive 76 | ((t (:background ,background-high-0 :foreground ,dead :box nil)))) 77 | `(fringe ((t (:background ,background)))) 78 | `(minibuffer-prompt ((t (:foreground ,orange :weight bold)))) 79 | `(cursor ((t (:background ,foreground :foreground ,background)))) 80 | `(error ((t (:foreground ,red)))) 81 | `(warning ((t (:foreground ,orange)))) 82 | `(success ((t (:foreground ,green)))) 83 | `(trailing-whitespace ((t (:background ,red :foregound ,white)))) 84 | `(whitespace-line 85 | ((t (:background ,background-high-0 :foregound ,foreground)))) 86 | ;; button 87 | `(button ((t (:underline t)))) 88 | ;; isearch 89 | `(isearch ((t (:inherit warning :background ,background-high-2 :bold t)))) 90 | `(isearch-fail ((t (:background ,red :foreground ,white)))) 91 | `(lazy-highlight ((t (:inherit default :background ,background-high-2)))) 92 | ;; replace 93 | `(match ((t (:inherit minibuffer-prompt)))) 94 | ;; font-lock 95 | `(font-lock-builtin-face ((t (:foreground ,2nd-foreground)))) 96 | `(font-lock-comment-face ((t (:slant italic :foreground ,foreground-low-3)))) 97 | `(font-lock-comment-delimiter-face 98 | ((t (:slant italic :foreground ,foreground-low-3)))) 99 | `(font-lock-constant-face ((t (:foreground ,2nd-foreground-low-1)))) 100 | `(font-lock-function-name-face ((t (:foreground ,foreground-low-1)))) 101 | `(font-lock-keyword-face ((t (:foreground ,foreground-low-2)))) 102 | `(font-lock-string-face ((t (:foreground ,3rd-foreground)))) 103 | `(font-lock-doc-face ((t (:foreground ,3rd-foreground)))) 104 | `(font-lock-type-face ((t (:foreground ,foreground-high-1)))) 105 | `(font-lock-variable-name-face ((t (:foreground ,2nd-foreground-high-1)))) 106 | `(font-lock-warning-face ((t (:inherit error)))) 107 | ;; outline 108 | `(outline-1 ((t (:inherit nil :foreground ,foreground-low-1)))) 109 | `(outline-2 ((t (:inherit nil :foreground ,foreground-low-2)))) 110 | `(outline-3 ((t (:inherit nil :foreground ,foreground-low-3)))) 111 | `(outline-4 ((t (:inherit nil :foreground ,2nd-foreground)))) 112 | `(outline-5 ((t (:inherit nil :foreground ,2nd-foreground-low-1)))) 113 | `(outline-6 ((t (:inherit outline-1)))) 114 | `(outline-7 ((t (:inherit outline-2)))) 115 | `(outline-8 ((t (:inherit outline-3)))) 116 | ;; org 117 | `(org-hide ((t (:foreground ,background)))) 118 | `(org-level-1 ((t (:inherit outline-1)))) 119 | `(org-level-2 ((t (:inherit outline-2)))) 120 | `(org-level-3 ((t (:inherit outline-3)))) 121 | `(org-level-4 ((t (:inherit outline-4)))) 122 | `(org-level-5 ((t (:inherit outline-5)))) 123 | `(org-level-6 ((t (:inherit outline-6)))) 124 | `(org-level-7 ((t (:inherit outline-7)))) 125 | `(org-level-8 ((t (:inherit outline-8)))) 126 | `(org-link ((t (:inherit outline-5 :underline t)))) 127 | ;; gnus 128 | `(gnus-group-mail-1 ((t (:inherit outline-1 :bold t)))) 129 | `(gnus-group-mail-1-empty ((t (:inherit outline-3)))) 130 | `(gnus-group-mail-2 ((t (:inherit outline-2 :bold t)))) 131 | `(gnus-group-mail-2-empty ((t (:inherit outline-3)))) 132 | `(gnus-group-mail-3 ((t (:inherit outline-3 :bold t)))) 133 | `(gnus-group-mail-3-empty ((t (:inherit outline-3)))) 134 | `(gnus-group-news-1 ((t (:foreground nil :inherit gnus-group-mail-1)))) 135 | `(gnus-group-news-1-empty 136 | ((t (:foreground nil :inherit gnus-group-mail-1-empty)))) 137 | `(gnus-group-news-2 ((t (:foreground nil :inherit gnus-group-mail-2)))) 138 | `(gnus-group-news-2-empty 139 | ((t (:foreground nil :inherit gnus-group-mail-2-empty)))) 140 | `(gnus-group-news-3 ((t (:foreground nil :inherit gnus-group-mail-3)))) 141 | `(gnus-group-news-3-empty 142 | ((t (:foreground nil :inherit gnus-group-mail-3-empty)))) 143 | `(gnus-header-name ((t (:inherit outline-4)))) 144 | `(gnus-header-subject ((t (:inherit outline-1)))) 145 | `(gnus-header-from ((t (:inherit outline-4)))) 146 | `(gnus-header-content ((t (:inherit outline-2)))) 147 | `(gnus-signature ((t nil))) 148 | `(gnus-summary-cancelled ((t (:inherit outline-3)))) 149 | `(gnus-summary-normal-ancient ((t (:inherit outline-4)))) 150 | `(gnus-summary-normal-read ((t (:inherit outline-5)))) 151 | `(gnus-summary-normal-unread ((t (:inherit outline-1 :weight bold)))) 152 | `(gnus-summary-selected ((t (:inverse-video t)))) 153 | `(gnus-summary-stripe ((t (:background ,background-high-0)))) 154 | `(gnus-summary-normal-ticked ((t (:inherit error)))) 155 | `(gnus-button ((t (:inherit outline-2)))) 156 | `(spam ((t (:foreground ,dead)))) 157 | `(gnus-cite-1 ((t (:inherit outline-1)))) 158 | `(gnus-cite-2 ((t (:inherit outline-2)))) 159 | `(gnus-cite-3 ((t (:inherit outline-3)))) 160 | `(gnus-cite-4 ((t (:inherit outline-4)))) 161 | `(gnus-cite-5 ((t (:inherit outline-5)))) 162 | `(gnus-cite-6 ((t (:inherit outline-6)))) 163 | `(gnus-cite-7 ((t (:inherit outline-7)))) 164 | `(gnus-cite-8 ((t (:inherit outline-8)))) 165 | `(gnus-cite-9 ((t (:inherit outline-1)))) 166 | `(gnus-cite-10 ((t (:inherit outline-2)))) 167 | `(gnus-cite-11 ((t (:inherit outline-3)))) 168 | ;; gnus-notify 169 | `(gnus-notify-mode-line-face 170 | ((t (:foreground ,2nd-foreground-high-1 :weight bold)))) 171 | ;; message 172 | `(message-header-to ((t (:inherit outline-1)))) 173 | `(message-header-cc ((t (:inherit outline-2)))) 174 | `(message-header-name ((t (:inherit outline-4)))) 175 | `(message-header-newsgroups ((t (:inherit outline-4)))) 176 | `(message-header-other ((t (:inherit outline-5)))) 177 | `(message-header-subject ((t (:inherit outline-1)))) 178 | `(message-separator ((t (:inherit outline-3)))) 179 | ;; erc 180 | `(erc-direct-msg-face ((t (:foreground ,orange)))) 181 | `(erc-error-face ((t (:foreground ,red)))) 182 | `(erc-header-face 183 | ((t (:foreground ,foreground :background ,alt-background)))) 184 | `(erc-input-face ((t (:foreground ,green)))) 185 | `(erc-keyword-face ((t (:foreground ,foreground-low-1)))) 186 | `(erc-current-nick-face ((t (:foreground ,green)))) 187 | `(erc-my-nick-face ((t (:foreground ,green)))) 188 | ;; This conflicts with the nick coloring hack. 189 | ;; `(erc-nick-default-face ((t (:weight normal :foreground ,purple)))) 190 | `(erc-nick-msg-face ((t (:weight normal :foreground ,foreground-low-2)))) 191 | `(erc-notice-face ((t (:foreground ,foreground-low-3)))) 192 | `(erc-pal-face ((t (:inherit warning)))) 193 | `(erc-prompt-face ((t (:foreground ,2nd-foreground-low-1)))) 194 | `(erc-timestamp-face ((t (:foreground ,2nd-foreground)))) 195 | ;; magit and diff 196 | `(magit-branch ((t (:inherit outline-1)))) 197 | `(magit-diff-added-highlight 198 | ((t (:background ,background-high-0 :foreground ,green :weight bold)))) 199 | `(diff-refine-added 200 | ((t (:background ,green-high-3 :foreground ,green-low-1 :weight bold)))) 201 | `(magit-diff-removed-highlight 202 | ((t (:background ,background-high-0 :foreground ,red :weight bold)))) 203 | `(diff-refine-removed 204 | ((t (:background ,red-high-3 :foreground ,red-low-1 :weight bold)))) 205 | `(magit-diff-added 206 | ((t (:background ,background-low :foreground ,green :weight bold)))) 207 | `(magit-diff-removed 208 | ((t (:background ,background-low :foreground ,red :weight bold)))) 209 | `(magit-diff-context-highlight ((t (:foreground ,foreground-high-1)))) 210 | `(magit-log-sha1 ((t (:foreground ,foreground-low-3)))) 211 | `(magit-log-message ((t (:foreground ,foreground)))) 212 | `(magit-item-highlight ((t (:background ,background-high-0)))) 213 | `(magit-section-title ((t (:inherit outline-2)))) 214 | ;; slime 215 | `(sldb-topline-face ((t (:inherit error)))) 216 | `(sldb-condition-face ((t (:inherit error)))) 217 | `(sldb-restartable-frame-line-face ((t (:inherit success)))) 218 | `(slime-repl-inputed-output-face ((t (:inherit outline-1)))) 219 | ;; markdown 220 | `(markdown-code-face ((t (:background ,background-high-0)))))) 221 | 222 | (provide 'color-theme-mgl) 223 | 224 | ;; Local Variables: 225 | ;; coding: utf-8 226 | ;; indent-tabs-mode: nil 227 | ;; End: 228 | 229 | ;;; color-theme-mgl.el ends here 230 | --------------------------------------------------------------------------------