1 ;;; BTCSB-theme.el --- Baby, the Code Shines Bright -*- lexical-binding: t; -*-
3 ;; Author: Joe Wreschnig
4 ;; Package-Version: 20170806
5 ;; Package-Requires: ((emacs "24"))
7 ;; URL: https://git.korewanetadesu.com/BTCSB-theme.git
9 ;; This is free and unencumbered software released into the public
10 ;; domain. Anyone is free to copy, modify, publish, use, compile,
11 ;; sell, or distribute this software, either in source code form or as
12 ;; a compiled binary, for any purpose, commercial or non-commercial,
17 ;; "Baby, The Code Shines Bright" is an Emacs adaptation of Jessica
18 ;; Allen's TextMate theme of the same name, which is in turn a
19 ;; TextMate adaptation of frilly dresses.
21 ;; Because Emacs is not TextMate, it doesn't look exactly the same,
22 ;; but it uses the same color palette and basic color choices.
28 (deftheme BTCSB "Baby, The Code Shines Bright theme
30 Baby, The Code Shines Bright is an Emacs adaptation of Jessica
31 Allen's TextMate theme of the same name, a pastel-on-dark color
32 palette inspired by lolita dresses. URL
33 `http://spacekat.github.com/blog/2010/08/26/cute-code-overload/'
35 That's in turn a TextMate adaptation of frilly dresses. URL
36 `http://www.babyssb.co.jp/'
38 The theme doesn't provide a default font family or size, but
39 recommended pairings are Fantasque Sans or Monaco.")
41 (defun BTCSB-theme-dim (color dark desaturate)
42 "Darken COLOR by DARK and desaturate it by DESATURATE."
43 (color-desaturate-name (color-darken-name color dark) desaturate))
45 (let (;; These are the colors from the original TextMate theme, along
46 ;; with what they were used for. These do not map cleanly either
47 ;; way to Emacs faces (I'm not sure what a "CSS constructor
48 ;; argument" even is) so the comments are more for reference
49 ;; back to the original file than any current use.
51 ;; "Support" refers to built-ins along with interfaces which are
52 ;; part of standard libraries; Emacs modes generally do not
53 ;; distinguish between library and client code.
55 ;; Most colors that were used as background colors are instead
56 ;; used as accents (e.g. underline and fringe), because Emacs
57 ;; doesn't blend colors when given multiple faces. Background
58 ;; colors are reserved for short-lived states that need
59 ;; immediate attention, e.g. region and search selection.
61 ;; TODO: Several of these colors are too dark to be reasonable,
62 ;; even if I assume they were in Generic RGB γ=2.2 originally.
63 ;; Also a few are indistinguishable to me on the displays
64 ;; I've tested so far (e.g. the two bright yellows). We could
65 ;; either merge them or pick a few more shades from more recent
66 ;; Baby design palettes.
68 (clr01 "#000000") ; background
69 (clr02 "#041C1A") ; line highlight
70 (clr03 "#1C1C1C") ; CSS constructor background
72 (clr04 "#F6F6F6") ; default foreground
73 (clr05 "#3E3E3E") ; precomposed "invisibles" foreground
74 (clr06 "#FFFFFF") ; caret
76 (clr07 "#4D605F") ; comment
77 (clr08 "#8693A5") ; CSS @at-rule
78 (clr09 "#9CA8D4") ; deprecated foreground
80 (clr10 "#D99ED1") ; entity
81 (clr11 "#DE99BF") ; support function, CSS property value
82 (clr12 "#F465B6") ; variable, string variable, CSS additional constant
84 (clr13 "#94579E") ; keyword
85 (clr14 "#9C69F6") ; regexp special
86 (clr15 "#A768EF") ; selection overlay
87 (clr16 "#442A61") ; premultiplied selection overlay, 41% opacity
89 (clr17 "#B3F382") ; string constant, support constant, CSS pseudo-class
90 (clr18 "#BFF294") ; constant
92 (clr19 "#FFC53B") ; old selection highlight at 48% opacity
93 (clr20 "#F9EE99") ; regexp
94 (clr21 "#FFF39E") ; storage (i.e. type)
96 (clr22 "#2A1852") ; deprecated background
97 (clr23 "#4B7FD4") ; support, inheritance, CSS constructor argument
98 (clr24 "#5BB5D0") ; CSS class name
99 (clr25 "#61C8C3") ; strings, embedded source
100 (clr26 "#9CEFF2") ; CSS tag name, ID
101 (clr27 "#D44741") ; illegal background
103 ;; Additional colors from a variant by Zak Remer
104 (clr28 "#240C29") ; alternate line highlight
105 (clr29 "#100E2D") ; alternate highlight
106 (clr30 "#DB558F") ; alternate storage modifier
109 (custom-theme-set-faces
113 `(button ((t (:inherit (link)))))
114 `(cursor ((t (:background ,clr06))))
115 `(default ((t (:background ,clr01 :foreground ,clr04))))
116 `(error ((t (:foreground ,clr27))))
117 `(escape-glyph ((t (:foreground ,clr18))))
118 `(fringe ((t (:background ,clr03))))
119 `(header-line ((t (:background ,clr02 :foreground ,clr08))))
120 `(highlight ((t (:background ,clr16))))
121 `(isearch ((t (:background ,clr15))))
122 `(lazy-highlight ((t (:background ,clr09))))
123 `(link ((t (:foreground ,clr26 :underline t))))
124 `(link-visited ((t (:inherit link :foreground ,clr25))))
125 `(match ((t (:inherit (lazy-highlight)))))
126 `(menu ((t (:background ,clr29))))
127 `(minibuffer-prompt ((t (:foreground ,clr17))))
128 `(mode-line ((t (:background ,clr14 :foreground ,clr02))))
129 `(mode-line-buffer-id ((t (:weight bold :foreground ,clr01))))
130 `(mode-line-emphasis ((t (:weight bold))))
131 `(mode-line-highlight ((t (:foreground ,clr21))))
132 `(mode-line-inactive ((t (:background ,(BTCSB-theme-dim clr14 25 55)
133 :inherit mode-line))))
134 `(nobreak-space ((t (:foreground ,clr05 :underline t))))
135 `(region ((t (:background ,clr16))))
136 `(secondary-selection ((t (:inherit (region)))))
137 `(shadow ((t (:foreground ,clr08))))
138 `(success ((t (:foreground ,clr17))))
139 `(trailing-whitespace ((t (:background ,clr22))))
140 `(tty-menu-enabled-face ((t (:foreground ,clr04 :background ,clr16))))
141 `(tty-menu-selected-face ((t (:foreground ,clr04 :background ,clr15))))
142 `(tty-menu-disabled-face ((t (:foreground ,clr08 :background ,clr16))))
143 `(warning ((t (:foreground ,clr19))))
146 `(font-lock-builtin-face ((t (:foreground ,clr23))))
147 `(font-lock-comment-delimiter-face ((t (:inherit (font-lock-comment-face)))))
148 `(font-lock-comment-face ((t (:foreground ,clr07))))
149 `(font-lock-constant-face ((t (:foreground ,clr18))))
150 `(font-lock-doc-face ((t (:foreground ,clr24))))
151 `(font-lock-function-name-face ((t (:foreground ,clr11))))
152 `(font-lock-keyword-face ((t (:foreground ,clr13))))
153 `(font-lock-negation-char-face ((t nil)))
154 `(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face)))))
155 `(font-lock-regexp-grouping-backslash ((t :foreground ,clr08)))
156 `(font-lock-regexp-grouping-construct ((t :foreground ,clr08)))
157 `(font-lock-string-face ((t (:foreground ,clr25))))
158 `(font-lock-type-face ((t (:foreground ,clr21))))
159 `(font-lock-variable-name-face ((t (:foreground ,clr12))))
160 `(font-lock-warning-face ((t (:foreground ,clr20))))
162 ;; Highlighted Line Face
163 `(hl-line ((t (:background ,clr28))))
165 ;; Matching / I-search Faces
166 `(isearch-fail ((t (:foreground ,clr09))))
167 `(query-replace ((t (:inherit (isearch)))))
169 ;; Flyspell Mode Faces
170 `(flyspell-incorrect ((t (:underline (:color ,clr27 :style wave)))))
171 ;; Repeating a mistake doesn't make it right.
172 `(flyspell-duplicate ((t (:inherit (flyspell-incorrect)))))
175 `(flycheck-error ((t (:underline (:color ,clr27 :style wave)))))
176 `(flycheck-error-list-error ((t (:foreground ,clr27))))
177 `(flycheck-fringe-error ((t (:foreground ,clr27))))
178 `(flycheck-warning ((t (:underline (:color ,clr19 :style wave)))))
179 `(flycheck-error-list-warning ((t (:foreground ,clr20))))
180 `(flycheck-fringe-warning ((t (:foreground ,clr20))))
181 `(flycheck-info ((t (:underline (:color ,clr24 :style wave)))))
182 `(flycheck-error-list-info ((t (:foreground ,clr24))))
183 `(flycheck-fringe-info ((t (:foreground ,clr24))))
184 `(flycheck-error-list-id ((t (:inherit (font-lock-constant-face)))))
185 `(flycheck-error-list-checker-name ((t (:foreground ,clr11))))
188 `(powerline-active1 ((t (:background ,clr13))))
189 `(powerline-active2 ((t (:background ,clr22))))
190 `(powerline-inactive1 ((t (:background ,clr16))))
191 `(powerline-inactive2 ((t (:background ,clr29))))
192 `(mode-line-buffer-id-inactive ((t (:inherit mode-line-inactive))))
194 ;; Pp^l Highlight Face - it's like a comment, I guess? I'm never
195 ;; happy with how this looks except that I'm always happier to see
196 ;; it than a literal ^L.
197 `(pp^L-highlight ((t (:box (:color ,clr07)))))
199 ;; Spar^L Mode Face. It's called "shines bright" after all.
200 `(spar^l-mode ((t (:foreground ,clr30))))
203 `(magit-section-highlight ((t (:inherit (region)))))
204 `(git-commit-summary ((t (:foreground ,clr09))))
205 `(git-commit-overlong-summary ((t (:inherit (error)))))
206 `(git-commit-nonempty-second-line ((t (:inherit (error)))))
209 `(web-mode-html-tag-face ((t (:foreground ,clr11))))
210 `(web-mode-html-attr-name-face ((t (:foreground ,clr11))))
211 `(web-mode-html-entity-face ((t (:foreground ,clr10))))
212 `(web-mode-html-attr-equal-face ((t (:inherit (shadow)))))
213 `(web-mode-css-selector-face ((t (:foreground ,clr26))))
214 `(web-mode-css-pseudo-class-face ((t (:foreground ,clr17))))
217 `(shr-link ((t (:foreground ,clr24))))
219 ;; Mail, elfeed, etc.
220 `(message-header-name ((t (:foreground ,clr07))))
221 `(message-header-subject ((t (:foreground ,clr04))))
222 `(message-header-to ((t (:foreground ,clr04))))
223 `(message-header-other ((t (:foreground ,clr23))))
226 `(elfeed-search-date-face ((t (:foreground ,clr07))))
227 `(elfeed-search-title-face ((t (:foreground ,clr04))))
228 `(elfeed-search-unread-title-face ((t (:foreground ,clr26))))
229 `(elfeed-search-feed-face ((t (:foreground ,clr23))))
230 `(elfeed-search-tag-face ((t (:foreground ,clr21))))
231 `(elfeed-search-last-update-face ((t (:foreground ,clr08))))
232 `(elfeed-search-unread-count-face ((t (:foreground ,clr18))))
233 `(elfeed-search-filter-face ((t (:foreground ,clr20))))
236 `(jabber-rare-time-face ((t (:inherit (variable-pitch)
237 :foreground ,clr08))))
238 `(jabber-chat-text-foreign ((t (:inherit (variable-pitch)))))
239 `(jabber-chat-text-local ((t (:inherit (variable-pitch)))))
240 `(jabber-chat-prompt-foreign ((t (:inherit (jabber-chat-text-foreign)
241 :foreground ,clr14))))
242 `(jabber-chat-prompt-local ((t (:inherit (jabber-chat-text-local)
243 :foreground ,clr13))))
244 `(jabber-chat-prompt-system ((t (:inherit (variable-pitch)
245 :foreground ,clr23))))
246 `(jabber-chat-error ((t (:inherit (variable-pitch)
247 :foreground ,clr27))))
248 `(jabber-roster-user-online ((t (:inherit (default)
249 :foreground ,clr17))))
250 `(jabber-roster-user-xa ((t (:inherit (default)
251 :foreground ,clr09))))
252 `(jabber-roster-user-dnd ((t (:inherit (default)
253 :foreground ,clr09))))
254 `(jabber-roster-user-away ((t (:inherit (default)
255 :foreground ,clr09))))
256 `(jabber-roster-user-chatty ((t (:inherit (default)
257 :foreground ,clr21))))
258 `(jabber-roster-user-error ((t (:inherit (default)
259 :foreground ,clr27))))
260 `(jabber-roster-user-offline ((t (:inherit (default)
261 :foreground ,clr07))))
262 `(jabber-title-small ((t (:inherit (variable-pitch)
264 :foreground ,clr08))))
265 `(jabber-title-medium ((t (:inherit (variable-pitch)
266 :height 1.0 :weight bold
267 :foreground ,clr08))))
268 `(jabber-title-large ((t (:inherit (variable-pitch)
269 :height 1.5 :weight bold
270 :foreground ,clr08))))
275 (add-to-list 'custom-theme-load-path
276 (file-name-directory load-file-name)))
278 (provide-theme 'BTCSB)
279 (provide 'BTCSB-theme)
281 ;;; BTCSB-theme.el ends here