;;; BTCSB-theme.el --- Baby, the Code Shines Bright -*- lexical-binding: t; -*- ;; ;; Author: Joe Wreschnig ;; Package-Version: 20170806 ;; Package-Requires: ((emacs "24")) ;; Keywords: faces ;; URL: https://git.korewanetadesu.com/BTCSB-theme.git ;; ;; This is free and unencumbered software released into the public ;; domain. Anyone is free to copy, modify, publish, use, compile, ;; sell, or distribute this software, either in source code form or as ;; a compiled binary, for any purpose, commercial or non-commercial, ;; and by any means. ;;; Commentary: ;; ;; "Baby, The Code Shines Bright" is an Emacs adaptation of Jessica ;; Allen's TextMate theme of the same name, which is in turn a ;; TextMate adaptation of frilly dresses. ;; ;; Because Emacs is not TextMate, it doesn't look exactly the same, ;; but it uses the same color palette and basic color choices. ;;; Code: (require 'color) (deftheme BTCSB "Baby, The Code Shines Bright theme Baby, The Code Shines Bright is an Emacs adaptation of Jessica Allen's TextMate theme of the same name, a pastel-on-dark color palette inspired by lolita dresses. URL `http://spacekat.github.com/blog/2010/08/26/cute-code-overload/' That's in turn a TextMate adaptation of frilly dresses. URL `http://www.babyssb.co.jp/' The theme doesn't provide a default font family or size, but recommended pairings are Fantasque Sans or Monaco.") (defun BTCSB-theme-dim (color dark desaturate) "Darken COLOR by DARK and desaturate it by DESATURATE." (color-desaturate-name (color-darken-name color dark) desaturate)) (let (;; These are the colors from the original TextMate theme, along ;; with what they were used for. These do not map cleanly either ;; way to Emacs faces (I'm not sure what a "CSS constructor ;; argument" even is) so the comments are more for reference ;; back to the original file than any current use. ;; ;; "Support" refers to built-ins along with interfaces which are ;; part of standard libraries; Emacs modes generally do not ;; distinguish between library and client code. ;; ;; Most colors that were used as background colors are instead ;; used as accents (e.g. underline and fringe), because Emacs ;; doesn't blend colors when given multiple faces. Background ;; colors are reserved for short-lived states that need ;; immediate attention, e.g. region and search selection. ;; TODO: Several of these colors are too dark to be reasonable, ;; even if I assume they were in Generic RGB γ=2.2 originally. ;; Also a few are indistinguishable to me on the displays ;; I've tested so far (e.g. the two bright yellows). We could ;; either merge them or pick a few more shades from more recent ;; Baby design palettes. (clr01 "#000000") ; background (clr02 "#041C1A") ; line highlight (clr03 "#1C1C1C") ; CSS constructor background (clr04 "#F6F6F6") ; default foreground (clr05 "#3E3E3E") ; precomposed "invisibles" foreground (clr06 "#FFFFFF") ; caret (clr07 "#4D605F") ; comment (clr08 "#8693A5") ; CSS @at-rule (clr09 "#9CA8D4") ; deprecated foreground (clr10 "#D99ED1") ; entity (clr11 "#DE99BF") ; support function, CSS property value (clr12 "#F465B6") ; variable, string variable, CSS additional constant (clr13 "#94579E") ; keyword (clr14 "#9C69F6") ; regexp special (clr15 "#A768EF") ; selection overlay (clr16 "#442A61") ; premultiplied selection overlay, 41% opacity (clr17 "#B3F382") ; string constant, support constant, CSS pseudo-class (clr18 "#BFF294") ; constant (clr19 "#FFC53B") ; old selection highlight at 48% opacity (clr20 "#F9EE99") ; regexp (clr21 "#FFF39E") ; storage (i.e. type) (clr22 "#2A1852") ; deprecated background (clr23 "#4B7FD4") ; support, inheritance, CSS constructor argument (clr24 "#5BB5D0") ; CSS class name (clr25 "#61C8C3") ; strings, embedded source (clr26 "#9CEFF2") ; CSS tag name, ID (clr27 "#D44741") ; illegal background ;; Additional colors from a variant by Zak Remer (clr28 "#240C29") ; alternate line highlight (clr29 "#100E2D") ; alternate highlight (clr30 "#DB558F") ; alternate storage modifier ) (custom-theme-set-faces 'BTCSB ;; Basic Faces `(button ((t (:inherit (link))))) `(cursor ((t (:background ,clr06)))) `(default ((t (:background ,clr01 :foreground ,clr04)))) `(error ((t (:foreground ,clr27)))) `(escape-glyph ((t (:foreground ,clr18)))) `(fringe ((t (:background ,clr03)))) `(header-line ((t (:background ,clr02 :foreground ,clr08)))) `(highlight ((t (:background ,clr16)))) `(isearch ((t (:background ,clr15)))) `(lazy-highlight ((t (:background ,clr09)))) `(link ((t (:foreground ,clr26 :underline t)))) `(link-visited ((t (:inherit link :foreground ,clr25)))) `(match ((t (:inherit (lazy-highlight))))) `(menu ((t (:background ,clr29)))) `(minibuffer-prompt ((t (:foreground ,clr17)))) `(mode-line ((t (:background ,clr14 :foreground ,clr02)))) `(mode-line-buffer-id ((t (:weight bold :foreground ,clr01)))) `(mode-line-emphasis ((t (:weight bold)))) `(mode-line-highlight ((t (:foreground ,clr21)))) `(mode-line-inactive ((t (:background ,(BTCSB-theme-dim clr14 25 55) :inherit mode-line)))) `(nobreak-space ((t (:foreground ,clr05 :underline t)))) `(region ((t (:background ,clr16)))) `(secondary-selection ((t (:inherit (region))))) `(shadow ((t (:foreground ,clr08)))) `(success ((t (:foreground ,clr17)))) `(trailing-whitespace ((t (:background ,clr22)))) `(tty-menu-enabled-face ((t (:foreground ,clr04 :background ,clr16)))) `(tty-menu-selected-face ((t (:foreground ,clr04 :background ,clr15)))) `(tty-menu-disabled-face ((t (:foreground ,clr08 :background ,clr16)))) `(warning ((t (:foreground ,clr19)))) ;; Font Lock Faces `(font-lock-builtin-face ((t (:foreground ,clr23)))) `(font-lock-comment-delimiter-face ((t (:inherit (font-lock-comment-face))))) `(font-lock-comment-face ((t (:foreground ,clr07)))) `(font-lock-constant-face ((t (:foreground ,clr18)))) `(font-lock-doc-face ((t (:foreground ,clr24)))) `(font-lock-function-name-face ((t (:foreground ,clr11)))) `(font-lock-keyword-face ((t (:foreground ,clr13)))) `(font-lock-negation-char-face ((t nil))) `(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face))))) `(font-lock-regexp-grouping-backslash ((t :foreground ,clr08))) `(font-lock-regexp-grouping-construct ((t :foreground ,clr08))) `(font-lock-string-face ((t (:foreground ,clr25)))) `(font-lock-type-face ((t (:foreground ,clr21)))) `(font-lock-variable-name-face ((t (:foreground ,clr12)))) `(font-lock-warning-face ((t (:foreground ,clr20)))) ;; Highlighted Line Face `(hl-line ((t (:background ,clr28)))) ;; Matching / I-search Faces `(isearch-fail ((t (:foreground ,clr09)))) `(query-replace ((t (:inherit (isearch))))) ;; Flyspell Mode Faces `(flyspell-incorrect ((t (:underline (:color ,clr27 :style wave))))) ;; Repeating a mistake doesn't make it right. `(flyspell-duplicate ((t (:inherit (flyspell-incorrect))))) ;; Flycheck Faces `(flycheck-error ((t (:underline (:color ,clr27 :style wave))))) `(flycheck-error-list-error ((t (:foreground ,clr27)))) `(flycheck-fringe-error ((t (:foreground ,clr27)))) `(flycheck-warning ((t (:underline (:color ,clr19 :style wave))))) `(flycheck-error-list-warning ((t (:foreground ,clr20)))) `(flycheck-fringe-warning ((t (:foreground ,clr20)))) `(flycheck-info ((t (:underline (:color ,clr24 :style wave))))) `(flycheck-error-list-info ((t (:foreground ,clr24)))) `(flycheck-fringe-info ((t (:foreground ,clr24)))) `(flycheck-error-list-id ((t (:inherit (font-lock-constant-face))))) `(flycheck-error-list-checker-name ((t (:foreground ,clr11)))) ;; Powerline Faces `(powerline-active1 ((t (:background ,clr13)))) `(powerline-active2 ((t (:background ,clr22)))) `(powerline-inactive1 ((t (:background ,clr16)))) `(powerline-inactive2 ((t (:background ,clr29)))) `(mode-line-buffer-id-inactive ((t (:inherit mode-line-inactive)))) ;; Pp^l Highlight Face - it's like a comment, I guess? I'm never ;; happy with how this looks except that I'm always happier to see ;; it than a literal ^L. `(pp^L-highlight ((t (:box (:color ,clr07))))) ;; Spar^L Mode Face. It's called "shines bright" after all. `(spar^l-mode ((t (:foreground ,clr30)))) ;; Magit Faces `(magit-section-highlight ((t (:inherit (region))))) ;; Web Mode Faces `(web-mode-html-tag-face ((t (:foreground ,clr11)))) `(web-mode-html-attr-name-face ((t (:foreground ,clr11)))) `(web-mode-html-entity-face ((t (:foreground ,clr10)))) `(web-mode-html-attr-equal-face ((t (:inherit (shadow))))) `(web-mode-css-selector-face ((t (:foreground ,clr26)))) `(web-mode-css-pseudo-class-face ((t (:foreground ,clr17)))) ;; SHR, EWW, etc. `(shr-link ((t (:foreground ,clr24)))) ;; Mail, elfeed, etc. `(message-header-name ((t (:foreground ,clr07)))) `(message-header-subject ((t (:foreground ,clr04)))) `(message-header-to ((t (:foreground ,clr04)))) `(message-header-other ((t (:foreground ,clr23)))) ;; Elfeed `(elfeed-search-date-face ((t (:foreground ,clr07)))) `(elfeed-search-title-face ((t (:foreground ,clr04)))) `(elfeed-search-unread-title-face ((t (:foreground ,clr26)))) `(elfeed-search-feed-face ((t (:foreground ,clr23)))) `(elfeed-search-tag-face ((t (:foreground ,clr21)))) `(elfeed-search-last-update-face ((t (:foreground ,clr08)))) `(elfeed-search-unread-count-face ((t (:foreground ,clr18)))) `(elfeed-search-filter-face ((t (:foreground ,clr20)))) ;; Jabber.el `(jabber-rare-time-face ((t (:inherit (variable-pitch) :foreground ,clr08)))) `(jabber-chat-text-foreign ((t (:inherit (variable-pitch))))) `(jabber-chat-text-local ((t (:inherit (variable-pitch))))) `(jabber-chat-prompt-foreign ((t (:inherit (jabber-chat-text-foreign) :foreground ,clr14)))) `(jabber-chat-prompt-local ((t (:inherit (jabber-chat-text-local) :foreground ,clr13)))) `(jabber-chat-prompt-system ((t (:inherit (variable-pitch) :foreground ,clr23)))) `(jabber-chat-error ((t (:inherit (variable-pitch) :foreground ,clr27)))) `(jabber-roster-user-online ((t (:inherit (default) :foreground ,clr17)))) `(jabber-roster-user-xa ((t (:inherit (default) :foreground ,clr09)))) `(jabber-roster-user-dnd ((t (:inherit (default) :foreground ,clr09)))) `(jabber-roster-user-away ((t (:inherit (default) :foreground ,clr09)))) `(jabber-roster-user-chatty ((t (:inherit (default) :foreground ,clr21)))) `(jabber-roster-user-error ((t (:inherit (default) :foreground ,clr27)))) `(jabber-roster-user-offline ((t (:inherit (default) :foreground ,clr07)))) `(jabber-title-small ((t (:inherit (variable-pitch) :height 1.0 :foreground ,clr08)))) `(jabber-title-medium ((t (:inherit (variable-pitch) :height 1.0 :weight bold :foreground ,clr08)))) `(jabber-title-large ((t (:inherit (variable-pitch) :height 1.5 :weight bold :foreground ,clr08)))) )) ;;;###autoload (when load-file-name (add-to-list 'custom-theme-load-path (file-name-directory load-file-name))) (provide-theme 'BTCSB) (provide 'BTCSB-theme) ;;; BTCSB-theme.el ends here