unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob a96416999176b52ffd366297b18936a6ff1e1fb4 3299 bytes (raw)
name: packages/context-coloring/context-coloring-themes.el 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
 
;;; context-coloring-themes.el --- Color schemes for Context Coloring. -*- lexical-binding: t; -*-

;; Copyright (C) 2014-2015  Free Software Foundation, Inc.

;; This file is part of GNU Emacs.

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;; An assortment of color schemes for Context Coloring, many of which are based
;; on existing color themes and custom themes.

;; To use, simply call `context-coloring-load-theme':

;; (require 'context-coloring)
;; (context-coloring-load-theme 'zenburn)

;;; Code:

(defvar context-coloring-theme-hash-table (make-hash-table :test 'eq)
  "Mapping of theme names to theme properties.")

(defun context-coloring-define-theme (theme &rest properties)
  "Define a theme named THEME for coloring scope levels.
PROPERTIES is a property list specifiying the following details:

`:colors': List of colors that this theme uses."
  (puthash
   theme
   (lambda ()
     (apply 'context-coloring-set-colors (plist-get properties :colors)))
   context-coloring-theme-hash-table))

(defun context-coloring-load-theme (theme)
  "Apply THEME's colors and other properties for context
coloring."
  (let ((function (gethash theme context-coloring-theme-hash-table)))
    (when (null function)
      (error (format "No such theme `%s'" theme)))
    (funcall function)))

(context-coloring-define-theme
 'monokai
 :colors '("#F8F8F2"
           "#66D9EF"
           "#A1EFE4"
           "#A6E22E"
           "#E6DB74"
           "#FD971F"
           "#F92672"
           "#FD5FF0"
           "#AE81FF"))

(context-coloring-define-theme
 'solarized
 :colors '("#839496"
           "#268bd2"
           "#2aa198"
           "#859900"
           "#b58900"
           "#cb4b16"
           "#dc322f"
           "#d33682"
           "#6c71c4"
           "#69B7F0"
           "#69CABF"
           "#B4C342"
           "#DEB542"
           "#F2804F"
           "#FF6E64"
           "#F771AC"
           "#9EA0E5"))

(context-coloring-define-theme
 'tango
 :colors '("#2e3436"
           "#346604"
           "#204a87"
           "#5c3566"
           "#a40000"
           "#b35000"
           "#c4a000"
           "#8ae234"
           "#8cc4ff"
           "#ad7fa8"
           "#ef2929"
           "#fcaf3e"
           "#fce94f"))

(context-coloring-define-theme
 'zenburn
 :colors '("#DCDCCC"
           "#93E0E3"
           "#BFEBBF"
           "#F0DFAF"
           "#DFAF8F"
           "#CC9393"
           "#DC8CC3"
           "#94BFF3"
           "#9FC59F"
           "#D0BF8F"
           "#DCA3A3"))

(provide 'context-coloring-themes)

;; Local Variables:
;; eval: (when (fboundp 'rainbow-mode) (rainbow-mode 1))
;; End:

;;; context-coloring-themes.el ends here

debug log:

solving a964169 ...
found a964169 in https://yhetil.org/emacs-devel/CAGiE8Az6kAQTNuhrZO_dGB1O9hOMqeSbxMOH0bG+RDLPUY0z=A@mail.gmail.com/

applying [1/1] https://yhetil.org/emacs-devel/CAGiE8Az6kAQTNuhrZO_dGB1O9hOMqeSbxMOH0bG+RDLPUY0z=A@mail.gmail.com/
diff --git a/packages/context-coloring/context-coloring-themes.el b/packages/context-coloring/context-coloring-themes.el
new file mode 100644
index 0000000..a964169

Checking patch packages/context-coloring/context-coloring-themes.el...
Applied patch packages/context-coloring/context-coloring-themes.el cleanly.

index at:
100644 a96416999176b52ffd366297b18936a6ff1e1fb4	packages/context-coloring/context-coloring-themes.el

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).