;;; olivtsi-theme.el --- Olivtsi dark colour theme -*- lexical-binding: t; -*- ;; Author: Venomade ;; Version: 0.1.0 ;; Package-Requires: ((emacs "26.1")) ;; Keywords: faces, theme, base16 ;; A dark base16-style theme built from the Olivtsi palette ;; (converted from the Alacritty YAML scheme of the same name). ;; This file is not part of GNU Emacs. ;; Testing the theme before install: use M-x load-file (not ;; eval-buffer), then M-x load-theme RET olivtsi. eval-buffer does ;; not bind `load-file-name', so the theme directory below never gets ;; registered and `load-theme' cannot find the file. ;;; Code: ;; Register the directory of this file with `load-theme', whether it ;; lives in a package-vc checkout, straight, or a plain clone. ;;;###autoload (when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) (deftheme olivtsi "A dark base16-style theme from the Olivtsi palette. Background and foreground come from the scheme's primary colours; the eight normal and eight bright colours cover the base16 syntax roles.") ;; Olivtsi palette ------------------------------------------------------ ;; base00 background #141612 ;; base01 bg-hl #2c2e28 ;; base02 selection #3c4036 ;; base03 comment #7a806f ;; base04 fg-soft #c2c7b3 ;; base05 foreground #f8ffeb ;; base08 red #a64c42 bright #cc7066 ;; base09 orange #de9d5f yellow #f0d074 ;; base0B green #8c9440 bright #b5bd68 ;; base0D blue #5f959d bright #81b6be ;; base0E magenta #85678f bright #b294bb ;; base0C cyan #5e9787 bright #8ac8b7 (let ((bg "#141612") (bg-alt "#2c2e28") (bg-sel "#3c4036") (comment "#7a806f") (fg-soft "#c2c7b3") (fg "#f8ffeb") (red "#a64c42") (red-b "#cc7066") (green "#8c9440") (green-b "#b5bd68") (orange "#de9d5f") (yellow "#f0d074") (blue "#5f959d") (blue-b "#81b6be") (magenta "#85678f") (magenta-b "#b294bb") (cyan "#5e9787") (cyan-b "#8ac8b7")) (custom-theme-set-faces 'olivtsi ;; Basics `(default ((t (:background ,bg :foreground ,fg)))) `(cursor ((t (:background ,fg)))) `(fringe ((t (:background ,bg :foreground ,comment)))) `(region ((t (:background ,bg-sel)))) `(secondary-selection ((t (:background ,bg-alt)))) `(hl-line ((t (:background ,bg-alt)))) `(header-line ((t (:background ,bg-alt :foreground ,fg)))) `(vertical-border ((t (:foreground ,bg-sel)))) `(shadow ((t (:foreground ,comment)))) `(link ((t (:foreground ,blue-b :underline t)))) `(link-visited ((t (:foreground ,magenta-b :underline t)))) `(tooltip ((t (:background ,bg-alt :foreground ,fg)))) `(minibuffer-prompt ((t (:foreground ,blue-b :bold t)))) `(escape-glyph ((t (:foreground ,cyan)))) `(nobreak-char ((t (:foreground ,cyan)))) `(match ((t (:background ,bg-sel :foreground ,fg :bold t)))) `(isearch ((t (:background ,blue-b :foreground ,bg :bold t)))) `(lazy-highlight ((t (:background ,bg-sel :foreground ,fg)))) `(show-paren-match ((t (:background ,cyan :foreground ,bg :bold t)))) `(show-paren-mismatch ((t (:background ,red :foreground ,bg :bold t)))) `(error ((t (:foreground ,red-b :bold t)))) `(warning ((t (:foreground ,yellow :bold t)))) `(success ((t (:foreground ,green-b :bold t)))) ;; Mode line `(mode-line ((t (:background ,bg-alt :foreground ,fg)))) `(mode-line-inactive ((t (:background ,bg :foreground ,comment)))) `(mode-line-emphasis ((t (:bold t)))) `(mode-line-highlight ((t (:background ,bg-sel :foreground ,fg)))) `(mode-line-buffer-id ((t (:foreground ,green-b :bold t)))) ;; Spacious padding ;; Line colour is read from the face's :foreground ;; (`spacious-padding--get-face-line-color'). `(spacious-padding-line-active ((t (:foreground ,green-b :bold t)))) `(spacious-padding-line-inactive ((t (:foreground ,comment)))) ;; Line numbers `(line-number ((t (:background ,bg :foreground ,bg-sel)))) `(line-number-current-line ((t (:background ,bg :foreground ,comment :bold t)))) ;; Font lock `(font-lock-builtin-face ((t (:foreground ,cyan-b)))) `(font-lock-comment-face ((t (:foreground ,comment :italic t)))) `(font-lock-comment-delimiter-face ((t (:foreground ,comment)))) `(font-lock-constant-face ((t (:foreground ,orange)))) `(font-lock-doc-face ((t (:foreground ,comment :italic t)))) `(font-lock-doc-markup-face ((t (:foreground ,green-b :italic t)))) `(font-lock-function-name-face ((t (:foreground ,blue-b)))) `(font-lock-keyword-face ((t (:foreground ,magenta-b)))) `(font-lock-preprocessor-face ((t (:foreground ,magenta)))) `(font-lock-regexp-grouping-backslash ((t (:foreground ,cyan)))) `(font-lock-regexp-grouping-construct ((t (:foreground ,orange)))) `(font-lock-string-face ((t (:foreground ,green-b)))) `(font-lock-type-face ((t (:foreground ,yellow)))) `(font-lock-variable-name-face ((t (:foreground ,red-b)))) `(font-lock-warning-face ((t (:foreground ,yellow :bold t)))) ;; Whitespace `(whitespace-trailing ((t (:background ,red :foreground ,fg)))) ;; Completion / minibuffer UI `(completions-common-part ((t (:foreground ,yellow :bold t)))) `(completions-annotations ((t (:foreground ,comment :italic t)))) `(corfu-current ((t (:background ,bg-sel :bold t)))) `(vertico-current ((t (:background ,bg-sel :bold t)))) ;; Diagnostics `(flymake-error ((t (:underline (:color ,red-b :style wave))))) `(flymake-warning ((t (:underline (:color ,yellow :style wave))))) `(flymake-note ((t (:underline (:color ,blue-b :style wave))))) ;; Compilation `(compilation-error ((t (:foreground ,red-b :bold t)))) `(compilation-warning ((t (:foreground ,yellow :bold t)))) `(compilation-info ((t (:foreground ,blue-b :bold t)))) `(compilation-line-number ((t (:foreground ,fg-soft)))) ;; Dired `(dired-directory ((t (:foreground ,blue-b :bold t)))) `(dired-symlink ((t (:foreground ,magenta-b)))) `(dired-mark ((t (:foreground ,orange)))) `(dired-flagged ((t (:foreground ,red-b :bold t)))) ;; Shell `(eshell-prompt ((t (:foreground ,orange :bold t)))) `(comint-highlight-prompt ((t (:foreground ,orange :bold t)))) ;; Outline / Org `(outline-1 ((t (:foreground ,red-b :bold t)))) `(outline-2 ((t (:foreground ,green-b :bold t)))) `(outline-3 ((t (:foreground ,blue-b :bold t)))) `(outline-4 ((t (:foreground ,orange :bold t)))) `(outline-5 ((t (:foreground ,magenta-b :bold t)))) `(outline-6 ((t (:foreground ,cyan-b :bold t)))) `(outline-7 ((t (:foreground ,yellow :bold t)))) `(outline-8 ((t (:foreground ,comment :bold t)))) `(org-level-1 ((t (:foreground ,red-b :bold t)))) `(org-level-2 ((t (:foreground ,green-b :bold t)))) `(org-level-3 ((t (:foreground ,blue-b :bold t)))) `(org-level-4 ((t (:foreground ,orange :bold t)))) `(org-level-5 ((t (:foreground ,magenta-b :bold t)))) `(org-level-6 ((t (:foreground ,cyan-b :bold t)))) `(org-level-7 ((t (:foreground ,yellow :bold t)))) `(org-level-8 ((t (:foreground ,comment :bold t)))) `(org-document-title ((t (:foreground ,yellow :bold t :height 1.2)))) `(org-document-info ((t (:foreground ,fg-soft :italic t)))) `(org-todo ((t (:foreground ,red-b :bold t)))) `(org-done ((t (:foreground ,green-b :bold t)))) `(org-headline-todo ((t (:foreground ,comment)))) `(org-headline-done ((t (:foreground ,comment)))) `(org-tag ((t (:foreground ,comment)))) `(org-date ((t (:foreground ,blue-b :underline t)))) `(org-link ((t (:foreground ,cyan-b :underline t)))) `(org-footnote ((t (:foreground ,blue-b :underline t)))) `(org-code ((t (:foreground ,orange)))) `(org-verbatim ((t (:foreground ,blue-b :background ,bg-alt)))) `(org-block ((t (:background ,bg-alt)))) `(org-block-begin-line ((t (:foreground ,comment :background ,bg-alt)))) `(org-block-end-line ((t (:foreground ,comment :background ,bg-alt)))) `(org-meta-line ((t (:foreground ,comment :italic t)))) `(org-special-keyword ((t (:foreground ,comment)))) `(org-drawer ((t (:foreground ,comment)))) `(org-property-value ((t (:foreground ,fg-soft)))) `(org-checkbox ((t (:foreground ,fg-soft)))) `(org-quote ((t (:italic t)))) `(org-agenda-structure ((t (:foreground ,magenta-b :bold t)))) `(org-agenda-date ((t (:foreground ,blue-b :bold t)))) `(org-agenda-date-weekend ((t (:foreground ,orange :bold t)))) `(org-agenda-done ((t (:foreground ,green-b)))) `(org-scheduled ((t (:foreground ,orange)))) `(org-scheduled-today ((t (:foreground ,yellow :bold t)))) `(org-scheduled-previously ((t (:foreground ,red-b)))) `(org-deadline ((t (:foreground ,red-b :bold t)))) `(org-upcoming-deadline ((t (:foreground ,orange)))) `(org-time-grid ((t (:foreground ,comment)))) ;; Magit (subset) `(magit-section-highlight ((t (:background ,bg-alt)))) `(magit-section-heading ((t (:foreground ,orange :bold t)))) `(magit-diff-file-heading ((t (:bold t)))) `(magit-diff-added ((t (:foreground ,green-b)))) `(magit-diff-removed ((t (:foreground ,red-b)))) `(magit-diff-context ((t (:foreground ,fg-soft)))) `(magit-diffstat-added ((t (:foreground ,green-b)))) `(magit-diffstat-removed ((t (:foreground ,red-b)))) `(magit-branch-local ((t (:foreground ,blue-b :bold t)))) `(magit-branch-remote ((t (:foreground ,green-b :bold t)))) `(magit-hash ((t (:foreground ,magenta)))) ;; Transient (LSP menu etc.) `(transient-key ((t (:foreground ,magenta-b :bold t)))) `(transient-value ((t (:foreground ,orange)))) `(transient-argument ((t (:foreground ,blue-b)))) `(transient-heading ((t (:foreground ,yellow :bold t)))) `(transient-inactive-argument ((t (:foreground ,comment)))) `(transient-inactive-value ((t (:foreground ,comment)))) ) (custom-theme-set-variables 'olivtsi '(frame-background-mode 'dark))) (provide-theme 'olivtsi) ;;; olivtsi-theme.el ends here