Skip to content

Instantly share code, notes, and snippets.

@bergmannf
Last active December 14, 2023 11:36
Show Gist options
  • Save bergmannf/9b3000cae1fbb24fd8b2f4b4fe362844 to your computer and use it in GitHub Desktop.
Save bergmannf/9b3000cae1fbb24fd8b2f4b4fe362844 to your computer and use it in GitHub Desktop.
Lucario theme for doom-emacs
(require 'doom-themes)
;;
;;; Variables
(defgroup doom-lucario-theme nil
"Options for the `doom-one' theme."
:group 'doom-themes)
(defcustom doom-lucario-padded-modeline doom-themes-padded-modeline
"If non-nil, adds a 4px padding to the mode-line.
Can be an integer to determine the exact padding."
:group 'doom-lucario-theme
:type '(choice integer boolean))
;;; Theme definition
(def-doom-theme doom-lucario
"A dark theme inspired by Atom One Dark."
;; name default 256 16
((bg '("#2b3e50" "black" "black" ))
(fg '("#F8F8F2" "#bfbfbf" "brightwhite" ))
;; These are off-color variants of bg/fg, used primarily for `solaire-mode',
;; but can also be useful as a basis for subtle highlights (e.g. for hl-line
;; or region), especially when paired with the `doom-darken', `doom-lighten',
;; and `doom-blend' helper functions.
(bg-alt '("#21242b" "#515869" "black" ))
(fg-alt '("#e8e8d5" "#aaadb0" "white" ))
;; These should represent a spectrum from bg to fg, where base0 is a starker
;; bg and base8 is a starker fg. For example, if bg is light grey and fg is
;; dark grey, base0 should be white and base8 should be black.
(base0 '("#223240" "black" "black" ))
(base1 '("#2b3e50" "#1e1e1e" "brightblack" ))
(base2 '("#3c4d5d" "#2e2e2e" "brightblack" ))
(base3 '("#415161" "#262626" "brightblack" ))
(base4 '("#76828b" "#3f3f3f" "brightblack" ))
(base5 '("#939ca2" "#525252" "brightblack" ))
(base6 '("#bcc2c3" "#6b6b6b" "brightblack" ))
(base7 '("#fafaf6" "#979797" "brightblack" ))
(base8 '("#ffffff" "#fefefd" "white" ))
(grey "#808080")
(red '("#e94b35" "#ba3c2a" "ff6541" ))
(orange '("#e56f1a" "#dd8844" "brightred" ))
(green '("#199c4b" "#147c3c" "#72cc5a" ))
(teal '("#74c5cb" "#b4faff" "#c8f3f6" ))
(yellow '("#f0cc04" "#E6A003" "FFFFA5" ))
(blue '("#5c98cd" "#AE7BF8" "D6ACFF" ))
(dark-blue '("#2257A0" "#2257A0" "blue" ))
(magenta '("#ca94ff" "#a176cc" "d4a9ff"))
(violet '("#a9a1e1" "#a9a1e1" "magenta" ))
(cyan '("#8be0fd" "#6fb3ca" "b9ecfd" ))
(dark-cyan '("#59D3FC" "#5699AF" "cyan" ))
;; These are the "universal syntax classes" that doom-themes establishes.
;; These *must* be included in every doom themes, or your theme will throw an
;; error, as they are used in the base theme defined in doom-themes-base.
(highlight blue)
(vertical-bar (doom-darken base1 0.1))
(selection dark-blue)
(builtin magenta)
(comments base5)
(doc-comments base5)
(constants violet)
(functions magenta)
(keywords blue)
(methods cyan)
(operators blue)
(type yellow)
(strings green)
(variables (doom-lighten magenta 0.4))
(numbers orange)
(region `(,(doom-lighten (car bg-alt) 0.15) ,@(doom-lighten (cdr base1) 0.35)))
(error red)
(warning yellow)
(success green)
(vc-modified orange)
(vc-added green)
(vc-deleted red)
;; These are extra color variables used only in this theme; i.e. they aren't
;; mandatory for derived themes.
(modeline-fg fg)
(modeline-fg-alt base5)
(modeline-bg (doom-darken bg-alt 0.1))
(modeline-bg-alt `(,(doom-darken (car bg-alt) 0.15) (cdr bg)))
(modeline-bg-inactive `(,(car bg-alt) ,@(cdr base1)))
(modeline-bg-inactive-alt `(,(doom-darken (car bg-alt) 0.1) ,@(cdr bg)))
(-modeline-pad
(when doom-lucario-padded-modeline
(if (integerp doom-lucario-padded-modeline) doom-lucario-padded-modeline 4))))
;;;; Base theme face overrides
(((line-number &override) :foreground base4)
((line-number-current-line &override) :foreground fg)
((font-lock-comment-face &override) :background 'unspecified)
(mode-line
:background modeline-bg :foreground modeline-fg
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg)))
(mode-line-inactive
:background modeline-bg-inactive :foreground modeline-fg-alt
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive)))
(mode-line-emphasis :foreground highlight)
;;;; css-mode <built-in> / scss-mode
(css-proprietary-property :foreground orange)
(css-property :foreground green)
(css-selector :foreground blue)
;;;; doom-modeline
(doom-modeline-bar :background highlight)
(doom-modeline-buffer-file :inherit 'mode-line-buffer-id :weight 'bold)
(doom-modeline-buffer-path :inherit 'mode-line-emphasis :weight 'bold)
(doom-modeline-buffer-project-root :foreground green :weight 'bold)
;;;; elscreen
(elscreen-tab-other-screen-face :background "#353a42" :foreground "#1e2022")
;;;; ivy
(ivy-current-match :background dark-blue :distant-foreground base0 :weight 'normal)
;;;; LaTeX-mode
(font-latex-math-face :foreground green)
;;;; markdown-mode
(markdown-markup-face :foreground base5)
(markdown-header-face :inherit 'bold :foreground red)
((markdown-code-face &override) :background (doom-lighten base3 0.05))
;;;; rjsx-mode
(rjsx-tag :foreground red)
(rjsx-attr :foreground orange)
;;;; solaire-mode
(solaire-mode-line-face
:inherit 'mode-line
:background modeline-bg-alt
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-alt)))
(solaire-mode-line-inactive-face
:inherit 'mode-line-inactive
:background modeline-bg-inactive-alt
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive-alt))))
;;;; Base theme variable overrides-
())
(provide 'doom-lucario)
;;; doom-lucario.el ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment