catppuccin-theme.el

   1;;; catppuccin-theme.el --- Catppuccin for Emacs - 🍄 Soothing pastel theme for Emacs -*- lexical-binding: t; no-byte-compile: t; -*-
   2
   3;; Copyright 2022-present, All rights reserved
   4;;
   5;; Code licensed under the MIT license
   6
   7;; Maintainer: Carsten Kragelund <carsten@kragelund.me>
   8;; Author: nyxkrage
   9;; Original-Author: film42
  10;; Version: 1.0.0
  11;; Package-Requires: ((emacs "25.1"))
  12;; URL: https://github.com/catppuccin/emacs
  13
  14;;; Commentary:
  15
  16;; 🍄 Soothing pastel theme for Emacs
  17
  18;;; Code:
  19(deftheme catppuccin)
  20
  21;;;; Configuration options:
  22
  23(defgroup catppuccin nil
  24  "Catppuccin theme options.
  25
  26The theme has to be reloaded after changing anything in this group."
  27  :group 'faces)
  28
  29(defcustom catppuccin-enlarge-headings t
  30  "Use different font sizes for some headings and titles."
  31  :type 'boolean
  32  :group 'catppuccin)
  33
  34(defcustom catppuccin-height-title-1 1.3
  35  "Header 1 font size."
  36  :type 'number
  37  :group 'catppuccin)
  38
  39(defcustom catppuccin-height-title-2 1.2
  40  "Header 2 font size."
  41  :type 'number
  42  :group 'catppuccin)
  43
  44(defcustom catppuccin-height-title-3 1.2
  45  "Header 3 font size."
  46  :type 'number
  47  :group 'catppuccin)
  48
  49(defcustom catppuccin-height-doc-title 1.44
  50  "Documentation Title font size."
  51  :type 'number
  52  :group 'catppuccin)
  53
  54(defcustom catppuccin-flavor 'mocha
  55  "The flavor to use for the Catppuccin theme.
  56Must be one of `mocha`, `macchiato`, `frappe`, or `latte`."
  57  :type '(choice (const :tag "Mocha" mocha)
  58                 (const :tag "Macchiato" macchiato)
  59                 (const :tag "Frappe" frappe)
  60                 (const :tag "Latte" latte))
  61  :group 'catppuccin)
  62
  63(defcustom catppuccin-mocha-colors '((rosewater . "#f5e0dc")
  64                                     (flamingo  . "#f2cdcd")
  65                                     (pink      . "#f5c2e7")
  66                                     (mauve     . "#cba6f7")
  67                                     (red       . "#f38ba8")
  68                                     (maroon    . "#eba0ac")
  69                                     (peach     . "#fab387")
  70                                     (yellow    . "#f9e2af")
  71                                     (green     . "#a6e3a1")
  72                                     (teal      . "#94e2d5")
  73                                     (sky       . "#89dceb")
  74                                     (sapphire  . "#74c7ec")
  75                                     (blue      . "#89b4fa")
  76                                     (lavender  . "#b4befe")
  77                                     (text      . "#cdd6f4")
  78                                     (subtext1  . "#bac2de")
  79                                     (subtext0  . "#a6adc8")
  80                                     (overlay2  . "#9399b2")
  81                                     (overlay1  . "#7f849c")
  82                                     (overlay0  . "#6c7086")
  83                                     (surface2  . "#585b70")
  84                                     (surface1  . "#45475a")
  85                                     (surface0  . "#313244")
  86                                     (base      . "#1e1e2e")
  87                                     (mantle    . "#181825")
  88                                     (crust     . "#11111b"))
  89  "Colors used for catppuccin-mocha."
  90  :tag "Mocha Colors"
  91  :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust)
  92  :type '(alist :key-type symbol :value-type string)
  93  :group 'catppuccin)
  94
  95(defcustom catppuccin-macchiato-colors '((rosewater . "#f4dbd6")
  96                                         (flamingo  . "#f0c6c6")
  97                                         (pink      . "#f5bde6")
  98                                         (mauve     . "#c6a0f6")
  99                                         (red       . "#ed8796")
 100                                         (maroon    . "#ee99a0")
 101                                         (peach     . "#f5a97f")
 102                                         (yellow    . "#eed49f")
 103                                         (green     . "#a6da95")
 104                                         (teal      . "#8bd5ca")
 105                                         (sky       . "#91d7e3")
 106                                         (sapphire  . "#7dc4e4")
 107                                         (blue      . "#8aadf4")
 108                                         (lavender  . "#b7bdf8")
 109                                         (text      . "#cad3f5")
 110                                         (subtext1  . "#b8c0e0")
 111                                         (subtext0  . "#a5adcb")
 112                                         (overlay2  . "#939ab7")
 113                                         (overlay1  . "#8087a2")
 114                                         (overlay0  . "#6e738d")
 115                                         (surface2  . "#5b6078")
 116                                         (surface1  . "#494d64")
 117                                         (surface0  . "#363a4f")
 118                                         (base      . "#24273a")
 119                                         (mantle    . "#1e2030")
 120                                         (crust     . "#181926"))
 121  "Colors used for catppuccin-macchiato."
 122  :tag "Macchiato Colors"
 123  :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust)
 124  :type '(alist :key-type symbol :value-type string)
 125  :group 'catppuccin)
 126
 127(defcustom catppuccin-frappe-colors '((rosewater . "#f2d5cf")
 128                                      (flamingo  . "#eebebe")
 129                                      (pink      . "#f4b8e4")
 130                                      (mauve     . "#ca9ee6")
 131                                      (red       . "#e78284")
 132                                      (maroon    . "#ea999c")
 133                                      (peach     . "#ef9f76")
 134                                      (yellow    . "#e5c890")
 135                                      (green     . "#a6d189")
 136                                      (teal      . "#81c8be")
 137                                      (sky       . "#99d1db")
 138                                      (sapphire  . "#85c1dc")
 139                                      (blue      . "#8caaee")
 140                                      (lavender  . "#babbf1")
 141                                      (text      . "#c6d0f5")
 142                                      (subtext1  . "#b5bfe2")
 143                                      (subtext0  . "#a5adce")
 144                                      (overlay2  . "#949cbb")
 145                                      (overlay1  . "#838ba7")
 146                                      (overlay0  . "#737994")
 147                                      (surface2  . "#626880")
 148                                      (surface1  . "#51576d")
 149                                      (surface0  . "#414559")
 150                                      (base      . "#303446")
 151                                      (mantle    . "#292c3c")
 152                                      (crust     . "#232634"))
 153  "Colors used for catppuccin-frappe."
 154  :tag "Frappe Colors"
 155  :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust)
 156  :type '(alist :key-type symbol :value-type string)
 157  :group 'catppuccin)
 158
 159(defcustom catppuccin-latte-colors '((rosewater . "#dc8a78")
 160                                     (flamingo  . "#dd7878")
 161                                     (pink      . "#ea76cb")
 162                                     (mauve     . "#8839ef")
 163                                     (red       . "#d20f39")
 164                                     (maroon    . "#e64553")
 165                                     (peach     . "#fe640b")
 166                                     (yellow    . "#df8e1d")
 167                                     (green     . "#40a02b")
 168                                     (teal      . "#179299")
 169                                     (sky       . "#04a5e5")
 170                                     (sapphire  . "#209fb5")
 171                                     (blue      . "#1e66f5")
 172                                     (lavender  . "#7287fd")
 173                                     (text      . "#4c4f69")
 174                                     (subtext1  . "#5c5f77")
 175                                     (subtext0  . "#6c6f85")
 176                                     (overlay2  . "#7c7f93")
 177                                     (overlay1  . "#8c8fa1")
 178                                     (overlay0  . "#9ca0b0")
 179                                     (surface2  . "#acb0be")
 180                                     (surface1  . "#bcc0cc")
 181                                     (surface0  . "#ccd0da")
 182                                     (base      . "#eff1f5")
 183                                     (mantle    . "#e6e9ef")
 184                                     (crust     . "#dce0e8"))
 185  "Colors used for catppuccin-latte."
 186  :tag "Latte Colors"
 187  :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust)
 188  :type '(alist :key-type symbol :value-type string)
 189  :group 'catppuccin)
 190
 191;;;; Internal functions
 192
 193(defun catppuccin-quantize-color (color)
 194  "Quantize COLOR to a 256 color palette."
 195  (let ((i 1)
 196        (str "#"))
 197    (while (<= i 5)
 198      (setq str
 199      (concat
 200       str
 201       (format
 202        "%02x"
 203        (* (round
 204      (/
 205       (string-to-number (substring color i (+ i 2)) 16)
 206       17))
 207     17))))
 208      (setq i (+ i 2)))
 209    str))
 210
 211;; Color operations
 212(let* ((hex-to-rgb (lambda (color)
 213                     (mapcar
 214                      (lambda (i) (string-to-number (substring color i (+ i 2)) 16))
 215                      '(1 3 5))))
 216       (rgb-to-hex (lambda (r g b)
 217                     (format "#%02x%02x%02x" r g b)))
 218       (rnd (lambda (n) (round (+ .5 n)))))
 219
 220  (defun catppuccin-lighten (color value)
 221    "Lighten COLOR by VALUE%."
 222    (let* ((factor (/ value 100.0)))
 223      (apply rgb-to-hex (mapcar (lambda (v) (funcall rnd (min 255 (+ (* (- 255 v) factor) v))))
 224              (funcall hex-to-rgb color)))))
 225
 226  (defun catppuccin-darken (color value)
 227    "Darken COLOR by VALUE%."
 228    (let* ((factor (/ value 100.0)))
 229      (apply rgb-to-hex (mapcar (lambda (v) (floor (* (- 1 factor) v)))
 230                                (funcall hex-to-rgb color))))))
 231
 232;;;; User functions
 233
 234(defun catppuccin-reload ()
 235  "Reload the Catppuccin theme, useful for after having set custom colors with `catppuccin-set-color`."
 236  (interactive)
 237  (disable-theme 'catppuccin)
 238  (load-theme 'catppuccin t))
 239
 240(defun catppuccin-set-color (color value &optional flavor)
 241  "Set the COLOR of FLAVOR or the current flavor to VALUE."
 242  (interactive "SChange color: \nsSet %s to: ")
 243  (setcdr (assoc color (symbol-value (intern-soft (concat "catppuccin-" (symbol-name (or flavor catppuccin-flavor)) "-colors")))) value))
 244
 245(defun catppuccin-get-color (color &optional flavor)
 246  "Get the COLOR of FLAVOR or the current flavor."
 247  (interactive "SThe color to get: ")
 248  (alist-get color (symbol-value (intern-soft (concat "catppuccin-" (symbol-name (or flavor catppuccin-flavor)) "-colors")))))
 249
 250;;;; Theme definition:
 251(let ((colors '((undef     "#ff00ff" "#ff00ff")
 252                (ctp-rosewater    (catppuccin-get-color 'rosewater) (catppuccin-quantize-color (catppuccin-get-color 'rosewater)))
 253                (ctp-flamingo   (catppuccin-get-color 'flamingo) (catppuccin-quantize-color (catppuccin-get-color 'flamingo)))
 254                (ctp-pink             (catppuccin-get-color 'pink) (catppuccin-quantize-color (catppuccin-get-color 'pink)))
 255                (ctp-mauve            (catppuccin-get-color 'mauve) (catppuccin-quantize-color (catppuccin-get-color 'mauve)))
 256                (ctp-red              (catppuccin-get-color 'red) (catppuccin-quantize-color (catppuccin-get-color 'red)))
 257                (ctp-maroon           (catppuccin-get-color 'maroon) (catppuccin-quantize-color (catppuccin-get-color 'maroon)))
 258                (ctp-peach            (catppuccin-get-color 'peach) (catppuccin-quantize-color (catppuccin-get-color 'peach)))
 259                (ctp-yellow           (catppuccin-get-color 'yellow) (catppuccin-quantize-color (catppuccin-get-color 'yellow)))
 260                (ctp-green            (catppuccin-get-color 'green) (catppuccin-quantize-color (catppuccin-get-color 'green)))
 261                (ctp-teal             (catppuccin-get-color 'teal) (catppuccin-quantize-color (catppuccin-get-color 'teal)))
 262                (ctp-sky              (catppuccin-get-color 'sky) (catppuccin-quantize-color (catppuccin-get-color 'sky)))
 263                (ctp-sapphire         (catppuccin-get-color 'sapphire) (catppuccin-quantize-color (catppuccin-get-color 'sapphire)))
 264                (ctp-blue             (catppuccin-get-color 'blue) (catppuccin-quantize-color (catppuccin-get-color 'blue)))
 265                (ctp-lavender         (catppuccin-get-color 'lavender) (catppuccin-quantize-color (catppuccin-get-color 'lavender)))
 266                (ctp-text             (catppuccin-get-color 'text) (catppuccin-quantize-color (catppuccin-get-color 'text)))
 267                (ctp-subtext1         (catppuccin-get-color 'subtext1) (catppuccin-quantize-color (catppuccin-get-color 'subtext1)))
 268                (ctp-subtext0         (catppuccin-get-color 'subtext0) (catppuccin-quantize-color (catppuccin-get-color 'subtext0)))
 269                (ctp-overlay2         (catppuccin-get-color 'overlay2) (catppuccin-quantize-color (catppuccin-get-color 'overlay2)))
 270                (ctp-overlay1         (catppuccin-get-color 'overlay1) (catppuccin-quantize-color (catppuccin-get-color 'overlay1)))
 271                (ctp-overlay0         (catppuccin-get-color 'overlay0) (catppuccin-quantize-color (catppuccin-get-color 'overlay0)))
 272                (ctp-surface2         (catppuccin-get-color 'surface2) (catppuccin-quantize-color (catppuccin-get-color 'surface2)))
 273                (ctp-surface1         (catppuccin-get-color 'surface1) (catppuccin-quantize-color (catppuccin-get-color 'surface1)))
 274                (ctp-surface0         (catppuccin-get-color 'surface0) (catppuccin-quantize-color (catppuccin-get-color 'surface0)))
 275                (ctp-base             (catppuccin-get-color 'base) (catppuccin-quantize-color (catppuccin-get-color 'base)))
 276                (ctp-mantle           (catppuccin-get-color 'mantle) (catppuccin-quantize-color (catppuccin-get-color 'mantle)))
 277                (ctp-crust            (catppuccin-get-color 'crust) (catppuccin-quantize-color (catppuccin-get-color 'crust)))
 278
 279                (ctp-current          (catppuccin-lighten (catppuccin-get-color 'base) 5)
 280                                      (catppuccin-quantize-color (catppuccin-lighten (catppuccin-get-color 'base) 5)))))
 281      (faces '(;; default / basic faces
 282               (cursor :background ,ctp-rosewater)
 283               (default :background ,ctp-base :foreground ,ctp-text)
 284               (default-italic :slant italic)
 285               (hl-todo :foreground ,ctp-peach)
 286               (error :foreground ,ctp-maroon)
 287               (ffap :foreground ,undef)
 288               (fringe :background ,ctp-base :foreground ,ctp-surface1)
 289               (header-line :inherit 'mode-line)
 290               (highlight :foreground ,ctp-text :background ,ctp-current)
 291               (hl-line :background ,ctp-current :extend t)
 292               (info-quoted-name :foreground ,undef)
 293               (info-string :foreground ,ctp-green)
 294               (lazy-highlight :foreground ,ctp-subtext1 :background ,ctp-surface1)
 295               (link :foreground ,ctp-rosewater :underline t)
 296               (link-unvisited :foreground ,ctp-mauve :underline t)
 297               (linum :foreground ,ctp-surface1 :background ,ctp-base)
 298               (line-number :foreground ,ctp-surface1 :background ,ctp-base)
 299               (line-number-current-line :inherit line-number :foreground ,ctp-lavender)
 300               (match :background ,ctp-surface1 :foreground ,ctp-text)
 301               (menu :background ,ctp-current :inverse-video nil :foreground ,ctp-text)
 302               (minibuffer-prompt :weight normal :foreground ,ctp-subtext0)
 303               (mode-line :background ,ctp-mantle nil :foreground ,ctp-text)
 304               (mode-line-inactive
 305                :background ,ctp-crust :inverse-video nil :foreground ,ctp-overlay0)
 306               (read-multiple-choice-face :inherit completions-first-difference)
 307               (region :background ,ctp-surface0 :extend t)
 308               (shadow :foreground ,ctp-surface2)
 309               (success :foreground ,ctp-green)
 310               (warning :foreground ,ctp-peach)
 311               (tooltip :foreground ,ctp-overlay2 :background ,ctp-surface0)
 312               (trailing-whitespace :inherit warning)
 313               (window-divider :foreground ,ctp-mantle)
 314               (vertical-border :foreground ,ctp-mantle)
 315               ;; solaire-mode
 316               (solaire-default-face :background ,ctp-mantle :foreground ,ctp-text)
 317               (solaire-fringe-face :background ,ctp-mantle :foreground ,ctp-surface1)
 318               (solaire-line-number-face :foreground ,ctp-surface1 :background ,ctp-mantle)
 319               (solaire-mode-line-face :background ,ctp-crust nil :foreground ,ctp-text)
 320               (solaire-mode-line-inactive-face
 321                :background ,ctp-crust :inverse-video nil :foreground ,ctp-subtext1)
 322               (solaire-header-line-face :inherit 'solaire-mode-line-face)
 323
 324               ;; evil
 325               (evil-ex-lazy-highlight :inherit lazy-highlight)
 326               (evil-ex-substitute-matches :foreground ,ctp-red :underline t)
 327               (evil-ex-substitute-replacement :foreground ,ctp-green :underline t)
 328
 329               ;; syntax / font-lock
 330               (font-lock-builtin-face :foreground ,ctp-lavender)
 331               (font-lock-comment-face :inherit shadow)
 332               (font-lock-comment-delimiter-face :inherit shadow)
 333               (font-lock-constant-face :foreground ,ctp-peach)
 334               (font-lock-doc-face :inherit font-lock-comment-face)
 335               (font-lock-function-name-face :foreground ,ctp-blue)
 336               (font-lock-keyword-face :foreground ,ctp-mauve)
 337               (font-lock-negation-char-face :foreground ,ctp-sky)
 338               (font-lock-preprocessor-face :foreground ,ctp-yellow)
 339               (font-lock-reference-face :inherit font-lock-constant-face) ;; obsolete
 340               (font-lock-regexp-grouping-backslash :foreground ,undef)
 341               (font-lock-regexp-grouping-construct :foreground ,undef)
 342               (font-lock-string-face :foreground ,ctp-green)
 343               (font-lock-type-face :inherit font-lock-builtin-face)
 344               (font-lock-variable-name-face :foreground ,ctp-text)
 345               (font-lock-warning-face :inherit warning)
 346               ;; auto-complete
 347               (ac-completion-face :underline t :foreground ,undef)
 348               ;; avy
 349               (avy-background-face :foreground ,ctp-text :background ,ctp-base)
 350               (avy-goto-char-timer-face :foreground ,ctp-blue :background ,ctp-surface0)
 351               (avy-lead-face :foreground ,ctp-base :background ,ctp-mauve)
 352               (avy-lead-face-0 :foreground ,ctp-base :background ,ctp-yellow)
 353               (avy-lead-face-1 :foreground ,ctp-base :background ,ctp-overlay0)
 354               (avy-lead-face-2 :foreground ,ctp-base :background ,ctp-sky)
 355               ;; company
 356               ;; TODO: find undef'ed faces
 357               (company-echo-common :foreground ,ctp-base :background ,ctp-text)
 358               (company-preview :background ,ctp-current :foreground ,undef)
 359               (company-preview-common :inherit company-preview
 360                                       :foreground ,ctp-green)
 361               (company-preview-search :inherit company-preview
 362                                       :foreground ,undef)
 363               (company-scrollbar-bg :background ,ctp-surface0)
 364               (company-scrollbar-fg :foreground ,undef)
 365               (company-tooltip :inherit tooltip)
 366               (company-tooltip-search :foreground ,undef
 367                                       :underline t)
 368               (company-tooltip-search-selection :background ,undef
 369                                                 :foreground ,ctp-base)
 370               (company-tooltip-selection :inherit match)
 371               (company-tooltip-mouse :background ,ctp-base)
 372               (company-tooltip-common :foreground ,ctp-text :weight bold)
 373               ;;(company-tooltip-common-selection :inherit company-tooltip-common)
 374               (company-tooltip-annotation :foreground ,ctp-green)
 375               (company-tooltip-annotation-selection :foreground ,ctp-mauve)
 376               ;; completions (minibuffer.el)
 377               (completions-annotations :inherit font-lock-comment-face)
 378               (completions-common-part :foreground ,ctp-rosewater)
 379               (completions-first-difference :foreground ,ctp-text)
 380               ;; diff-hl
 381               (diff-hl-change :foreground ,ctp-peach :background ,ctp-peach)
 382               (diff-hl-delete :foreground ,ctp-red :background ,ctp-red)
 383               (diff-hl-insert :foreground ,ctp-green :background ,ctp-green)
 384               ;; diff-refine
 385               (diff-refine-removed :weight bold)
 386               (diff-refine-added :weight bold)
 387               ;; git-gutter
 388               (git-gutter:modified :foreground ,ctp-peach)
 389               (git-gutter:deleted :foreground ,ctp-red)
 390               (git-gutter:added :foreground ,ctp-green)
 391               (git-gutter:seperator :inherit font-lock-comment-face)
 392               (git-gutter:unchanged :foreground ,ctp-surface0)
 393               ;; git-gutter fringe
 394               (git-gutter-fr:modified :inherit git-gutter:modified)
 395               (git-gutter-fr:deleted :inherit git-gutter:deleted)
 396               (git-gutter-fr:added :inherit git-gutter:added)
 397               ;; dired
 398               (dired-flagged :foreground ,ctp-maroon :weight bold)
 399               (dired-marked :weight bold)
 400               (dired-mark :inherit dired-marked)
 401               (dired-header :foreground ,ctp-sapphire :weight bold)
 402               (dired-ignored :inherit font-lock-comment-face)
 403               (dired-special :foreground ,ctp-yellow)
 404               (dired-symlink :foreground ,ctp-pink)
 405               (dired-warning :inherit warning)
 406               (dired-directory :foreground ,ctp-blue)
 407               (dired-perm-write :foreground ,ctp-green)
 408               (dired-broken-symlink :foreground ,ctp-text :background ,ctp-red)
 409               ;; dired+ (kept for legacy support)
 410               ;; TODO (maybe): Show deprecation warning
 411               ;; This doesn't make sense to keep around
 412               (diredp-compressed-file-name :inherit dired-file-name)
 413               (diredp-compressed-file-suffix :foreground ,ctp-green)
 414               (diredp-date-time :foreground ,ctp-subtext0)
 415               (diredp-deletion-file-name :inherit dired-flagged)
 416               (diredp-deletion :inherit dired-flagged)
 417               (diredp-dir-heading :inherit dired-header)
 418               (diredp-dir-name :inherit dired-directory)
 419               (diredp-dir-priv :inherit dired-directory)
 420               (diredp-executable-tag :foreground ,ctp-red)
 421               (diredp-file-suffix :inherit dired-file-name)
 422               (diredp-flag-mark-line :inherit dired-marked)
 423               (diredp-flag-mark :inherit dired-mark)
 424               (diredp-ignored-file-name :foreground ,ctp-text)
 425               (diredp-mode-line-flagged :foreground ,undef)
 426               (diredp-mode-line-marked :foreground ,undef)
 427               (diredp-no-priv :foreground ,ctp-surface2)
 428               (diredp-number :foreground ,ctp-yellow)
 429               (diredp-other-priv :inherit diredp-exec-priv)
 430               (diredp-rare-priv :inherit diredp-exec-priv)
 431               (diredp-read-priv :foreground ,ctp-sky)
 432               (diredp-write-priv :inherit dired-perm-write)
 433               (diredp-exec-priv :foreground ,ctp-red)
 434               (diredp-symlink :inherit dired-symlink)
 435               (diredp-link-priv :inherit dired-symlink)
 436               (diredp-autofile-name :foreground ,undef)
 437               (diredp-tagged-autofile-name :foreground ,undef)
 438               ;; diredfl (more modernly published dired+)
 439               (diredfl-file-name :inherit dired-file-name)
 440               (diredfl-compressed-file-name :inherit dired-file-name)
 441               (diredfl-compressed-file-suffix :foreground ,ctp-green)
 442               (diredfl-date-time :foreground ,ctp-subtext0)
 443               (diredfl-deletion-file-name :inherit dired-flagged)
 444               (diredfl-deletion :inherit dired-flagged)
 445               (diredfl-dir-heading :inherit dired-header)
 446               (diredfl-dir-name :inherit dired-directory)
 447               (diredfl-dir-priv :inherit dired-directory)
 448               (diredfl-executable-tag :foreground ,ctp-red)
 449               (diredfl-file-suffix :inherit dired-file-name)
 450               (diredfl-flag-mark-line :inherit dired-marked)
 451               (diredfl-flag-mark :inherit dired-mark)
 452               (diredfl-ignored-file-name :foreground ,ctp-text)
 453               (diredfl-mode-line-flagged :foreground ,undef)
 454               (diredfl-mode-line-marked :foreground ,undef)
 455               (diredfl-no-priv :foreground ,ctp-surface2)
 456               (diredfl-number :foreground ,ctp-yellow)
 457               (diredfl-other-priv :inherit diredfl-exec-priv)
 458               (diredfl-rare-priv :inherit diredfl-exec-priv)
 459               (diredfl-read-priv :foreground ,ctp-sky)
 460               (diredfl-write-priv :inherit dired-perm-write)
 461               (diredfl-exec-priv :foreground ,ctp-red)
 462               (diredfl-symlink :inherit dired-symlink)
 463               (diredfl-link-priv :inherit dired-symlink)
 464               (diredfl-autofile-name :foreground ,undef)
 465               (diredfl-tagged-autofile-name :foreground ,undef)
 466               ;; eldoc-box
 467               (eldoc-box-border :background ,ctp-current)
 468               (eldoc-box-body :background ,ctp-current)
 469               ;; elfeed
 470               (elfeed-search-date-face :foreground ,ctp-subtext0)
 471               (elfeed-search-title-face :foreground ,ctp-text)
 472               (elfeed-search-unread-title-face :foreground ,ctp-rosewater)
 473               (elfeed-search-feed-face :foreground ,ctp-text :weight bold)
 474               (elfeed-search-tag-face :foreground ,ctp-green)
 475               (elfeed-search-last-update-face :weight bold)
 476               (elfeed-search-unread-count-face :foreground ,ctp-pink)
 477               (elfeed-search-filter-face :foreground ,ctp-green :weight bold)
 478               (elfeed-log-date-face :inherit elfeed-search-date-face)
 479               (elfeed-log-error-level-face :inherit error)
 480               (elfeed-log-warn-level-face :foreground ,ctp-peach)
 481               (elfeed-log-info-level-face :weight bold)
 482               (elfeed-log-debug-level-face :weight bold)
 483               ;; elpher
 484               (elpher-gemini-heading1 :weight bold :foreground ,ctp-blue
 485                                       ,@(when catppuccin-enlarge-headings
 486                                           (list :height catppuccin-height-title-1)))
 487               (elpher-gemini-heading2 :foreground ,ctp-blue
 488                                       ,@(when catppuccin-enlarge-headings
 489                                           (list :height catppuccin-height-title-2)))
 490               (elpher-gemini-heading3 :foreground ,ctp-blue
 491                                       ,@(when catppuccin-enlarge-headings
 492                                           (list :height catppuccin-height-title-3)))
 493               (elpher-gemini-preformatted :inherit fixed-pitch
 494                                           :foreground ,ctp-green)
 495               ;; enh-ruby
 496               (enh-ruby-heredoc-delimiter-face :foreground ,ctp-yellow)
 497               (enh-ruby-op-face :inherit haskell-operator-face)
 498               (enh-ruby-regexp-delimiter-face :foreground ,ctp-yellow)
 499               (enh-ruby-string-delimiter-face :foreground ,ctp-yellow)
 500               ;; flyspell
 501               (flyspell-duplicate :underline (:style wave :color ,ctp-teal))
 502               (flyspell-incorrect :underline (:style wave :color ,ctp-maroon))
 503               ;; font-latex
 504               (font-latex-bold-face :foreground ,ctp-red :weight bold)
 505               (font-latex-italic-face :foreground ,ctp-yellow :slant italic)
 506               (font-latex-match-reference-keywords :foreground ,ctp-teal)
 507               (font-latex-match-variable-keywords :foreground ,ctp-text)
 508               (font-latex-string-face :foreground ,ctp-green)
 509               (font-latex-warning-face :inherit warning)
 510               ;; TODO: More latex faces to be themed, especially sections
 511               ;; gemini
 512               (gemini-heading-face-1 :weight bold :foreground ,ctp-blue
 513                                      ,@(when catppuccin-enlarge-headings
 514                                          (list :height catppuccin-height-title-1)))
 515               (gemini-heading-face-2 :foreground ,ctp-blue
 516                                      ,@(when catppuccin-enlarge-headings
 517                                          (list :height catppuccin-height-title-2)))
 518               (gemini-heading-face-3 :foreground ,ctp-blue
 519                                      ,@(when catppuccin-enlarge-headings
 520                                          (list :height catppuccin-height-title-3)))
 521               (gemini-heading-face-rest :foreground ,ctp-blue)
 522               (gemini-quote-face :foreground ,ctp-green)
 523               ;; go-test
 524               (go-test--ok-face :inherit success)
 525               (go-test--error-face :inherit error)
 526               (go-test--warning-face :inherit warning)
 527               (go-test--pointer-face :foreground ,ctp-pink)
 528               (go-test--standard-face :foreground ,ctp-teal)
 529               ;; haskell-mode
 530               (haskell-operator-face :foreground ,ctp-sky)
 531               (haskell-constructor-face :foreground ,ctp-mauve)
 532               ;; helm
 533               ;; TODO: Theme helm
 534               (helm-bookmark-w3m :foreground ,undef)
 535               (helm-buffer-not-saved :foreground ,undef)
 536               (helm-buffer-process :foreground ,undef)
 537               (helm-buffer-saved-out :foreground ,undef)
 538               (helm-buffer-size :foreground ,undef)
 539               (helm-candidate-number :foreground ,undef)
 540               (helm-ff-directory :foreground ,undef)
 541               (helm-ff-dotted-directory :foreground ,undef)
 542               (helm-ff-executable :foreground ,undef)
 543               (helm-ff-file :foreground ,undef)
 544               (helm-ff-invalid-symlink :foreground ,undef)
 545               (helm-ff-prefix :foreground ,undef)
 546               (helm-ff-symlink :foreground ,undef)
 547               (helm-grep-cmd-line :foreground ,undef)
 548               (helm-grep-file :foreground ,undef)
 549               (helm-grep-finish :foreground ,undef)
 550               (helm-grep-lineno :foreground ,undef)
 551               (helm-grep-match :inherit match)
 552               (helm-grep-running :foreground ,undef)
 553               (helm-header :foreground ,undef)
 554               (helm-moccur-buffer :foreground ,undef)
 555               (helm-selection :underline nil)
 556               (helm-selection-line)
 557               (helm-separator :foreground ,undef)
 558               (helm-source-go-package-godoc-description :foreground ,undef)
 559               (helm-source-header :foreground ,undef)
 560               (helm-time-zone-current :foreground ,undef)
 561               (helm-time-zone-home :foreground ,undef)
 562               (helm-visible-mark :foreground ,undef)
 563               ;; consult
 564               (consult-async-split :foreground ,ctp-mauve)
 565               ;; corfu
 566               (corfu-default :background ,ctp-surface0)
 567               (corfu-current :background ,ctp-surface1)
 568               (corfu-bar :background ,ctp-subtext0)
 569               (corfu-border :inherit corfu-default)
 570               (corfu-annotations :inherit font-lock-comment-face)
 571               (corfu-deprecated :strike-through t)
 572               ;; highlight-indentation minor mode
 573               (highlight-indentation-face :background ,ctp-subtext1)
 574               ;; icicle
 575               ;; TODO: Verify this looks proper
 576               (icicle-whitespace-highlight :background ,ctp-text)
 577               (icicle-special-candidate :foreground ,ctp-subtext1)
 578               (icicle-extra-candidate :foreground ,ctp-subtext1)
 579               (icicle-search-main-regexp-others :foreground ,ctp-text)
 580               (icicle-search-current-input :foreground ,ctp-pink)
 581               (icicle-search-context-level-8 :foreground ,ctp-blue)
 582               (icicle-search-context-level-7 :foreground ,ctp-blue)
 583               (icicle-search-context-level-6 :foreground ,ctp-blue)
 584               (icicle-search-context-level-5 :foreground ,ctp-blue)
 585               (icicle-search-context-level-4 :foreground ,ctp-blue)
 586               (icicle-search-context-level-3 :foreground ,ctp-blue)
 587               (icicle-search-context-level-2 :foreground ,ctp-blue)
 588               (icicle-search-context-level-1 :foreground ,ctp-blue)
 589               (icicle-search-main-regexp-current :foreground ,ctp-text)
 590               (icicle-saved-candidate :foreground ,ctp-text)
 591               (icicle-proxy-candidate :foreground ,ctp-text)
 592               (icicle-mustmatch-completion :foreground ,ctp-mauve)
 593               (icicle-multi-command-completion :foreground ,ctp-subtext0)
 594               (icicle-msg-emphasis :foreground ,ctp-green)
 595               (icicle-mode-line-help :foreground ,ctp-overlay2)
 596               (icicle-match-highlight-minibuffer :foreground ,ctp-mauve)
 597               (icicle-match-highlight-Completions :foreground ,ctp-green)
 598               (icicle-key-complete-menu-local :foreground ,ctp-text)
 599               (icicle-key-complete-menu :foreground ,ctp-text)
 600               (icicle-input-completion-fail-lax :foreground ,ctp-maroon)
 601               (icicle-input-completion-fail :foreground ,ctp-maroon)
 602               (icicle-historical-candidate-other :foreground ,ctp-text)
 603               (icicle-historical-candidate :foreground ,ctp-text)
 604               (icicle-current-candidate-highlight :foreground ,ctp-pink)
 605               (icicle-Completions-instruction-2 :foreground ,ctp-overlay2)
 606               (icicle-Completions-instruction-1 :foreground ,ctp-overlay2)
 607               (icicle-completion :foreground ,ctp-text)
 608               (icicle-complete-input :foreground ,ctp-peach)
 609               (icicle-common-match-highlight-Completions :foreground ,ctp-mauve)
 610               (icicle-candidate-part :foreground ,ctp-text)
 611               (icicle-annotation :foreground ,ctp-overlay2)
 612               ;; icomplete
 613               (icompletep-determined :foreground ,ctp-blue)
 614               ;; ido
 615               (ido-first-match :foreground ,ctp-green)
 616               (ido-only-match :foreground ,ctp-green)
 617               (ido-subdir :inherit dired-directory)
 618               (ido-virtual :foreground ,ctp-sapphire)
 619               (ido-incomplete-regexp :inherit warning)
 620               (ido-indicator :foreground ,ctp-text :weight bold)
 621               ;; ivy
 622               (ivy-current-match                            :background ,ctp-blue :foreground ,ctp-mantle :bold t)
 623               (ivy-action                                   :background nil :foreground ,ctp-lavender)
 624               (ivy-grep-line-number                         :background nil :foreground ,ctp-peach)
 625               (ivy-minibuffer-match-face-1                  :background nil :foreground ,ctp-blue :bold t)
 626               (ivy-minibuffer-match-face-2                  :background nil :foreground ,ctp-sapphire)
 627               (ivy-minibuffer-match-face-3                  :background nil :foreground ,ctp-lavender)
 628               (ivy-minibuffer-match-face-4                  :background nil :foreground ,ctp-mauve)
 629               (ivy-minibuffer-match-highlight               :foreground ,ctp-blue)
 630               (ivy-grep-info                                :foreground ,ctp-blue)
 631               (ivy-grep-line-number                         :foreground ,ctp-mauve)
 632               (ivy-confirm-face                             :foreground ,ctp-green)
 633               (ivy-remote                                   :foreground ,ctp-mauve)
 634               (ivy-match-required-face                      :foreground ,ctp-red)
 635               ;; isearch
 636               (isearch :inherit match :weight bold)
 637               (isearch-fail :inherit error)
 638               ;; jde-java
 639               (jde-java-font-lock-constant-face :inherit font-lock-constant-face)
 640               (jde-java-font-lock-modifier-face :inherit font-lock-keyword-face)
 641               (jde-java-font-lock-number-face :foreground ,ctp-text)
 642               (jde-java-font-lock-package-face :foreground ,ctp-text)
 643               (jde-java-font-lock-private-face :inherit font-lock-keyword-face)
 644               (jde-java-font-lock-public-face :inherit font-lock-keyword-face)
 645               ;; js2-mode
 646               (js2-external-variable :foreground ,ctp-red)
 647               (js2-function-param :inherit tree-sitter-hl-face:variable.parameter)
 648               (js2-jsdoc-html-tag-delimiter :inherit web-mode-html-tag-bracket-face)
 649               (js2-jsdoc-html-tag-name :inherit web-mode-html-tag-face)
 650               (js2-jsdoc-value :foreground ,ctp-text)
 651               (js2-private-function-call :inherit tree-sitter-hl-face:function.call)
 652               (js2-private-member :inherit font-lock-variable-name-face)
 653               ;; js3-mode
 654               (js3-error-face :inherit error)
 655               (js3-external-variable-face :foreground ,ctp-text)
 656               (js3-function-param-face :inherit js2-function-param)
 657               (js3-instance-member-face :inherit font-lock-variable-name-face)
 658               (js3-jsdoc-tag-face :inherit web-mode-html-tag-face)
 659               (js3-warning-face :inherit warning)
 660               ;; lsp
 661               (lsp-ui-peek-peek :background ,ctp-base)
 662               (lsp-ui-peek-list :background ,ctp-surface2)
 663               (lsp-ui-peek-filename :foreground ,ctp-text)
 664               (lsp-ui-peek-line-number :foreground ,ctp-surface1)
 665               (lsp-ui-peek-highlight :inherit highlight :distant-foreground ,ctp-base)
 666               (lsp-ui-peek-header :foreground ,ctp-sapphire, :weight bold)
 667               (lsp-ui-peek-footer :inherit lsp-ui-peek-header)
 668               (lsp-ui-peek-selection :inherit match)
 669               (lsp-ui-sideline-symbol :foreground ,ctp-subtext0)
 670               (lsp-ui-sideline-current-symbol :foreground ,ctp-text :weight bold)
 671               (lsp-ui-sideline-code-action :foreground ,ctp-yellow)
 672               (lsp-ui-sideline-symbol-info :slant italic :height 0.99)
 673               (lsp-ui-doc-background :background ,ctp-base)
 674               (lsp-ui-doc-header :foreground ,ctp-sapphire)
 675               ;; magit
 676               (magit-branch-local :foreground ,ctp-teal)
 677               (magit-branch-remote :foreground ,ctp-green)
 678               (magit-tag :foreground ,ctp-peach)
 679               (magit-section-heading :foreground ,ctp-blue :weight bold)
 680               (magit-section-highlight :background ,ctp-surface0 :extend t)
 681               (magit-diff-context-highlight :background ,ctp-surface0
 682                                             :foreground ,ctp-text
 683                                             :extend t)
 684               (magit-diff-revision-summary :foreground ,ctp-blue
 685                                            :weight bold)
 686               (magit-diff-revision-summary-highlight :foreground ,ctp-blue
 687                                                      :weight bold)
 688               (magit-diff-added :foreground ,ctp-green
 689                                 :extend t)
 690               (magit-diff-added-highlight :background ,ctp-surface1
 691                                           :foreground ,ctp-green
 692                                           :extend t)
 693               (magit-diff-removed :foreground ,ctp-red
 694                                   :extend t)
 695               (magit-diff-removed-highlight :background ,ctp-surface1
 696                                             :foreground ,ctp-red
 697                                             :extend t)
 698               (magit-diff-file-heading :foreground ,ctp-text)
 699               (magit-diff-file-heading-highlight :inherit magit-section-highlight)
 700               (magit-diffstat-added :foreground ,ctp-green)
 701               (magit-diffstat-removed :foreground ,ctp-red)
 702               (magit-hash :foreground ,ctp-subtext0)
 703               (diff-header :foreground ,ctp-blue)
 704               (diff-hunk-header :foreground ,ctp-text :background ,ctp-surface2)
 705               (magit-diff-hunk-heading :inherit diff-hunk-header)
 706               (magit-diff-hunk-heading-highlight :inherit diff-hunk-header :weight bold)
 707               (magit-item-highlight :background ,undef)
 708               (magit-log-author :foreground ,ctp-subtext0)
 709               (magit-process-ng :foreground ,ctp-peach :weight bold)
 710               (magit-process-ok :foreground ,ctp-green :weight bold)
 711               ;; markdown
 712               (markdown-blockquote-face :foreground ,ctp-green)
 713               (markdown-code-face :foreground ,ctp-text)
 714               (markdown-footnote-face :foreground ,ctp-yellow)
 715               (markdown-header-face :weight normal)
 716               (markdown-header-face-1
 717                :foreground ,ctp-blue
 718                ,@(when catppuccin-enlarge-headings
 719                    (list :height catppuccin-height-title-1)))
 720               (markdown-header-face-2
 721                :foreground ,ctp-blue
 722                ,@(when catppuccin-enlarge-headings
 723                    (list :height catppuccin-height-title-2)))
 724               (markdown-header-face-3
 725                :foreground ,ctp-blue
 726                ,@(when catppuccin-enlarge-headings
 727                    (list :height catppuccin-height-title-3)))
 728               (markdown-header-face-4 :foreground ,ctp-blue)
 729               (markdown-header-face-5 :foreground ,ctp-blue)
 730               (markdown-header-face-6 :foreground ,ctp-blue)
 731               (markdown-inline-code-face :foreground ,ctp-green)
 732               (markdown-plain-url-face :inherit link)
 733               (markdown-pre-face :foreground ,ctp-green)
 734               (markdown-table-face :foreground ,ctp-text)
 735               (markdown-list-face :foreground ,ctp-mauve)
 736               (markdown-language-keyword-face :inherit font-lock-comment-face)
 737               ;; message
 738               (message-header-to :foreground ,ctp-text :weight bold)
 739               (message-header-cc :foreground ,ctp-text :weight bold)
 740               (message-header-subject :foreground ,ctp-blue)
 741               (message-header-newsgroups :foreground ,ctp-mauve)
 742               (message-header-other :foreground ,ctp-mauve)
 743               (message-header-name :foreground ,ctp-green)
 744               (message-header-xheader :foreground ,ctp-lavender)
 745               (message-separator :inherit font-lock-comment-face)
 746               (message-cited-text :foreground ,ctp-green)
 747               (message-cited-text-1 :foreground ,ctp-yellow)
 748               (message-cited-text-2 :inherit font-lock-comment-face)
 749               (message-cited-text-3 :inherit font-lock-comment-face)
 750               (message-cited-text-4 :inherit font-lock-comment-face)
 751               (message-mml :foreground ,ctp-green :weight normal)
 752               ;; mini-modeline
 753               (mini-modeline-mode-line :inherit mode-line :height 0.1 :box nil)
 754               ;; mu4e
 755               (mu4e-unread-face :foreground ,ctp-rosewater)
 756               (mu4e-view-url-number-face :foreground ,ctp-yellow)
 757               (mu4e-highlight-face :background ,ctp-base
 758                                    :weight bold
 759                                    :extend t)
 760               (mu4e-header-highlight-face :background ,ctp-current
 761                                           :foreground ,ctp-text
 762                                           :underline nil :weight bold
 763                                           :extend t)
 764               (mu4e-header-key-face :inherit message-mml)
 765               (mu4e-header-marks-face :foreground ,ctp-mauve)
 766               (mu4e-cited-1-face :foreground ,ctp-green)
 767               (mu4e-cited-2-face :foreground ,ctp-yellow)
 768               (mu4e-cited-3-face :inherit font-lock-comment-face)
 769               (mu4e-cited-4-face :inherit font-lock-comment-face)
 770               (mu4e-cited-5-face :inherit font-lock-comment-face)
 771               ;; neotree
 772               (neo-banner-face :foreground ,ctp-blue :weight bold)
 773               ;;(neo-button-face :underline nil)
 774               (neo-dir-link-face :inherit link)
 775               (neo-expand-btn-face :foreground ,ctp-text)
 776               (neo-file-link-face :inherit link)
 777               (neo-header-face :weight bold)
 778               (neo-root-dir-face :foreground ,ctp-blue :weight bold)
 779               (neo-vc-added-face :foreground ,ctp-green)
 780               (neo-vc-conflict-face :inherit error)
 781               (neo-vc-default-face :inherit default)
 782               (neo-vc-edited-face :foreground ,ctp-peach)
 783               (neo-vc-ignored-face :inherit font-lock-comment-face)
 784               (neo-vc-missing-face :foreground ,ctp-maroon)
 785               (neo-vc-needs-merge-face :foreground ,ctp-maroon
 786                                        :weight bold)
 787               ;;(neo-vc-needs-update-face :underline t)
 788               (neo-vc-removed-face :foreground ,ctp-red)
 789               (neo-vc-unlocked-changes-face :foreground ,ctp-red)
 790               ;;(neo-vc-unregistered-face nil)
 791               (neo-vc-up-to-date-face :foreground ,ctp-text)
 792               (neo-vc-user-face :foreground ,ctp-mauve)
 793               ;; orderless
 794               (orderless-match-face-0 :foreground ,ctp-blue :weight bold)
 795               (orderless-match-face-1 :foreground ,ctp-mauve :weight bold)
 796               (orderless-match-face-2 :foreground ,ctp-teal :weight bold)
 797               (orderless-match-face-3 :foreground ,ctp-peach :weight bold)
 798               ;; org
 799               (org-agenda-date :foreground ,ctp-subtext0 :weight normal)
 800               (org-agenda-date-today :foreground ,ctp-subtext0 :weight bold)
 801               (org-agenda-date-weekend :inherit org-agenda-date)
 802               (org-agenda-date-weekend-today :inherit org-agenda-date :weight bold)
 803               (org-agenda-dimmed-todo-face :inherit font-lock-comment-face)
 804               (org-agenda-done :foreground ,ctp-green)
 805               (org-agenda-structure :foreground ,ctp-subtext0)
 806               (org-block :foreground ,ctp-green)
 807               (org-code :foreground ,ctp-green)
 808               (org-column :background ,ctp-surface0)
 809               (org-column-title :inherit org-column :weight bold :underline t)
 810               (org-date :inherit org-agenda-date)
 811               (org-document-info :foreground ,ctp-sapphire)
 812               (org-document-info-keyword :inherit font-lock-comment-face)
 813               (org-document-title :weight bold :foreground ,ctp-blue
 814                                   ,@(when catppuccin-enlarge-headings
 815                                       (list :height catppuccin-height-doc-title)))
 816               (org-done :inherit font-lock-comment-face)
 817               (org-ellipsis :inherit font-lock-comment-face)
 818               (org-footnote :foreground ,ctp-mauve)
 819               (org-formula :foreground ,ctp-pink)
 820               (org-headline-done :inherit org-done)
 821               (org-hide :foreground ,ctp-crust :background ,ctp-base)
 822               (org-level-1 :inherit bold :foreground ,ctp-blue
 823                            ,@(when catppuccin-enlarge-headings
 824                                (list :height catppuccin-height-title-1)))
 825               (org-level-2 :inherit bold :foreground ,ctp-blue
 826                            ,@(when catppuccin-enlarge-headings
 827                                (list :height catppuccin-height-title-2)))
 828               (org-level-3 :weight normal :foreground ,ctp-blue
 829                            ,@(when catppuccin-enlarge-headings
 830                                (list :height catppuccin-height-title-3)))
 831               (org-level-4 :weight normal :foreground ,ctp-blue)
 832               (org-level-5 :weight normal :foreground ,ctp-blue)
 833               (org-level-6 :weight normal :foreground ,ctp-blue)
 834               (org-level-7 :weight normal :foreground ,ctp-blue)
 835               (org-level-8 :weight normal :foreground ,ctp-blue)
 836               (org-link :inherit link)
 837               (org-priority :foreground ,ctp-yellow)
 838               (org-quote :inherit markdown-blockquote-face)
 839               (org-scheduled :foreground ,ctp-green)
 840               (org-scheduled-previously :foreground ,ctp-teal)
 841               (org-scheduled-today :foreground ,ctp-green :weight bold)
 842               (org-sexp-date :foreground ,ctp-subtext0)
 843               (org-special-keyword :inherit font-lock-keyword-face)
 844               (org-table :foreground ,ctp-surface2)
 845               (org-tag :foreground ,ctp-mauve :weight bold)
 846               (org-todo :foreground ,ctp-peach)
 847               (org-upcoming-deadline :foreground ,ctp-maroon)
 848               (org-verbatim :inherit org-quote)
 849               (org-warning :inherit warning)
 850               ;; calfw
 851               (cfw:face-title :foreground ,ctp-blue :weight bold :height 1.5)
 852               (cfw:face-header :foreground ,ctp-text)
 853               (cfw:face-sunday :foreground ,ctp-overlay1)
 854               (cfw:face-saturday :foreground ,ctp-overlay1)
 855               (cfw:face-holiday :foreground ,ctp-green)
 856               (cfw:face-grid :foreground ,ctp-surface0)
 857               (cfw:face-default-content :foreground ,ctp-peach)
 858               (cfw:face-periods :foreground ,undef)
 859               (cfw:face-day-title :foreground ,ctp-subtext0)
 860               (cfw:face-default-day :foreground ,ctp-text)
 861               (cfw:face-annotation :foreground ,undef)
 862               (cfw:face-disable :foreground ,ctp-surface1)
 863               (cfw:face-today-title :foreground ,ctp-peach)
 864               (cfw:face-today :inherit cfw:face-today-title)
 865               (cfw:face-select :background ,ctp-surface1 :foregournd ,ctp-text)
 866               (cfw:face-toolbar :background ,ctp-base)
 867               (cfw:face-toolbar-button-off :foreground ,ctp-rosewater)
 868               (cfw:face-toolbar-button-on :foreground ,ctp-mauve)
 869               ;; outline
 870               (outline-1 :foreground ,ctp-blue)
 871               (outline-2 :foreground ,ctp-blue)
 872               (outline-3 :foreground ,ctp-blue)
 873               (outline-4 :foreground ,ctp-blue)
 874               (outline-5 :foreground ,ctp-blue)
 875               (outline-6 :foreground ,ctp-blue)
 876               ;; perspective
 877               (persp-selected-face :weight bold :foreground ,ctp-pink)
 878               ;; rainbow-delimiters
 879               (rainbow-delimiters-depth-1-face :foreground ,ctp-red)
 880               (rainbow-delimiters-depth-2-face :foreground ,ctp-peach)
 881               (rainbow-delimiters-depth-3-face :foreground ,ctp-yellow)
 882               (rainbow-delimiters-depth-4-face :foreground ,ctp-green)
 883               (rainbow-delimiters-depth-5-face :foreground ,ctp-sapphire)
 884               (rainbow-delimiters-depth-6-face :foreground ,ctp-red)
 885               (rainbow-delimiters-depth-7-face :foreground ,ctp-peach)
 886               (rainbow-delimiters-depth-8-face :foreground ,ctp-yellow)
 887               (rainbow-delimiters-unmatched-face :inherit warning)
 888               ;; rst (reStructuredText)
 889               (rst-level-1 :foreground ,ctp-blue)
 890               (rst-level-2 :foreground ,ctp-blue)
 891               (rst-level-3 :foreground ,ctp-blue)
 892               (rst-level-4 :foreground ,ctp-blue)
 893               (rst-level-5 :foreground ,ctp-blue)
 894               (rst-level-6 :foreground ,ctp-blue)
 895               (rst-level-7 :foreground ,ctp-blue)
 896               (rst-level-8 :foreground ,ctp-blue)
 897               ;; show-paren
 898               (show-paren-match :foreground ,ctp-pink
 899                                 :weight bold)
 900               (show-paren-match-expression :inherit match)
 901               (show-paren-mismatch :inherit warning)
 902               ;; slime
 903               (slime-repl-inputed-output-face :foreground ,ctp-mauve)
 904               ;; spam
 905               (spam :inherit gnus-summary-normal-read :foreground ,ctp-peach
 906                     :strike-through t :slant oblique)
 907               ;; tab-bar & tab-line (since Emacs 27.1)
 908               (tab-bar :foreground ,ctp-subtext0 :background ,ctp-base)
 909               (tab-bar-tab :foreground ,ctp-text :background ,ctp-current)
 910               (tab-bar-tab-inactive :foreground ,ctp-subtext0 :background ,ctp-base)
 911               (tab-line :inherit tab-bar)
 912               (tab-line-tab :inherit tab-bar-tab)
 913               (tab-line-tab-inactive :inherit tab-bar-tab-inactive)
 914               (tab-line-tab-current :inherit tab-line-tab)
 915               (tab-line-highlight :background ,ctp-surface1)
 916               ;; centaur-tabs
 917               (centaur-tabs-default :foreground ,ctp-subtext0, :background ,ctp-base)
 918               (centaur-tabs-unselected :foreground ,ctp-subtext0 :background ,ctp-mantle)
 919               (centaur-tabs-selected :foreground ,ctp-text :background ,ctp-current)
 920               (centaur-tabs-unselected-modified :foreground ,ctp-maroon :background ,ctp-mantle)
 921               (centaur-tabs-selected-modified :foreground ,ctp-red :background ,ctp-current)
 922               (centaur-tabs-close-unselected :foreground ,ctp-subtext0 :background ,ctp-mantle)
 923               (centaur-tabs-close-selected :foreground ,ctp-text :background ,ctp-current)
 924               (centaur-tabs-name-mouse-face :foreground ,ctp-text :background ,ctp-surface1)
 925               (centaur-tabs-close-mouse-face :foreground ,ctp-red :background ,ctp-surface1)
 926               (centaur-tabs-modified-marker-selected :inherit centaur-tabs-selected-modified)
 927               (centaur-tabs-modified-marker-unselected :inherit centaur-tabs-unselected-modified)
 928               ;; term
 929               (term :foreground ,ctp-text :background ,ctp-base)
 930               (term-color-black ,@(if (eq catppuccin-flavor 'latte)
 931                                  (list :foreground ctp-subtext1  :background ctp-subtext1)
 932                                (list :foreground ctp-surface1 :background ctp-surface1)))
 933               (term-color-black-white ,@(if (eq catppuccin-flavor 'latte)
 934                                  (list :foreground ctp-subtext0 :background ctp-subtext0)
 935                                (list :foreground ctp-surface2 :background ctp-surface2)))
 936               (term-color-red :foreground ,ctp-red :background ,ctp-red)
 937               (term-color-bright-red :foreground ,ctp-red :background ,ctp-red)
 938               (term-color-green :foreground ,ctp-green :background ,ctp-green)
 939               (term-color-bright-green :foreground ,ctp-green :background ,ctp-green)
 940               (term-color-yellow :foreground ,ctp-yellow :background ,ctp-yellow)
 941               (term-color-bright-yellow :foreground ,ctp-yellow :background ,ctp-yellow)
 942               (term-color-blue :foreground ,ctp-blue :background ,ctp-blue)
 943               (term-color-bright-blue :foreground ,ctp-blue :background ,ctp-blue)
 944               (term-color-magenta :foreground ,ctp-pink :background ,ctp-pink)
 945               (term-color-bright-magenta :foreground ,ctp-pink :background ,ctp-pink)
 946               (term-color-cyan :foreground ,ctp-teal :background ,ctp-teal)
 947               (term-color-bright-cyan :foreground ,ctp-teal :background ,ctp-teal)
 948               (term-color-white ,@(if (eq catppuccin-flavor 'latte)
 949                                  (list :foreground ctp-surface2  :background ctp-surface2)
 950                                (list :foreground ctp-subtext1 :background ctp-subtext1)))
 951               (term-color-bright-white ,@(if (eq catppuccin-flavor 'latte)
 952                                  (list :foreground ctp-surface1 :background ctp-surface1)
 953                                (list :foreground ctp-subtext0 :background ctp-subtext0)))
 954               ;; tree-sitter
 955               (tree-sitter-hl-face:attribute :inherit font-lock-constant-face)
 956               (tree-sitter-hl-face:comment :inherit font-lock-comment-face)
 957               (tree-sitter-hl-face:constant :inherit font-lock-constant-face)
 958               (tree-sitter-hl-face:constant.builtin :inherit font-lock-builtin-face)
 959               (tree-sitter-hl-face:constructor :inherit font-lock-constant-face)
 960               (tree-sitter-hl-face:escape :foreground ,undef)
 961               (tree-sitter-hl-face:function :inherit font-lock-function-name-face)
 962               (tree-sitter-hl-face:function.builtin :inherit font-lock-builtin-face)
 963               (tree-sitter-hl-face:function.call :inherit font-lock-function-name-face
 964                                                  :weight normal)
 965               (tree-sitter-hl-face:function.macro :inherit font-lock-preprocessor-face)
 966               (tree-sitter-hl-face:function.special :inherit font-lock-preprocessor-face)
 967               (tree-sitter-hl-face:keyword :inherit font-lock-keyword-face)
 968               (tree-sitter-hl-face:punctuation :foreground ,undef)
 969               (tree-sitter-hl-face:punctuation.bracket :foreground ,ctp-text)
 970               (tree-sitter-hl-face:punctuation.delimiter :foreground ,ctp-text)
 971               (tree-sitter-hl-face:punctuation.special :foreground ,undef)
 972               (tree-sitter-hl-face:string :inherit font-lock-string-face)
 973               (tree-sitter-hl-face:string.special :foreground ,undef)
 974               (tree-sitter-hl-face:tag :inherit font-lock-keyword-face)
 975               (tree-sitter-hl-face:type :inherit font-lock-type-face)
 976               (tree-sitter-hl-face:type.parameter :foreground ,ctp-sapphire)
 977               (tree-sitter-hl-face:variable :inherit font-lock-variable-name-face)
 978               (tree-sitter-hl-face:variable.parameter :foreground ,ctp-red)
 979               ;; undo-tree
 980               (undo-tree-visualizer-current-face :foreground ,ctp-peach)
 981               (undo-tree-visualizer-default-face :foreground ,ctp-subtext0)
 982               (undo-tree-visualizer-register-face :foreground ,ctp-mauve)
 983               (undo-tree-visualizer-unmodified-face :foreground ,ctp-text)
 984               ;; web-mode
 985               (web-mode-builtin-face :inherit font-lock-builtin-face)
 986               (web-mode-comment-face :inherit font-lock-comment-face)
 987               (web-mode-constant-face :inherit font-lock-constant-face)
 988               (web-mode-css-property-name-face :inherit font-lock-constant-face)
 989               (web-mode-doctype-face :inherit font-lock-comment-face)
 990               (web-mode-function-name-face :inherit font-lock-function-name-face)
 991               (web-mode-html-attr-name-face :foreground ,ctp-blue)
 992               (web-mode-html-attr-value-face :foreground ,ctp-green)
 993               (web-mode-html-tag-face :foreground ,ctp-mauve)
 994               (web-mode-keyword-face :inherit font-lock-keyword-face)
 995               (web-mode-string-face :inherit font-lock-string-face)
 996               (web-mode-type-face :inherit font-lock-type-face)
 997               (web-mode-warning-face :inherit warning)
 998               ;; which-func
 999               (which-func :inherit font-lock-function-name-face)
1000               ;; which-key
1001               (which-key-key-face :inherit font-lock-builtin-face)
1002               (which-key-command-description-face :inherit default)
1003               (which-key-separator-face :inherit font-lock-comment-delimiter-face)
1004               (which-key-local-map-description-face :foreground ,ctp-green)
1005               ;; whitespace
1006               (whitespace-big-indent :foreground ,ctp-peach)
1007               (whitespace-empty :inherit warning)
1008               (whitespace-hspace :background ,undef :foreground ,undef)
1009               (whitespace-indentation :foreground ,ctp-surface0)
1010               (whitespace-line :underline (:style wave :color ,ctp-mauve))
1011               (whitespace-newline :inherit font-lock-comment-face)
1012               (whitespace-space :inherit font-lock-comment-face)
1013               (whitespace-space-after-tab :inherit warning)
1014               (whitespace-space-before-tab :inherit warning)
1015               (whitespace-tab :inherit whitespace-newline)
1016               (whitespace-trailing :inherit trailing-whitespace)
1017               ;; yard-mode
1018               (yard-tag-face :inherit font-lock-builtin-face)
1019               (yard-directive-face :inherit font-lock-builtin-face)
1020               ;; line-reminder
1021               (line-reminder-modified-sign-face :foreground ,ctp-green)
1022               ;; highlight-indent-guides
1023               ;; (highlight-indent-guides-odd-face :background ,ctp-base)
1024               ;; (highlight-indent-guides-even-face :background ,ctp-base)
1025               (highlight-indent-guides-character-face :foreground ,ctp-surface0)
1026               ;; (highlight-indent-guides-top-odd-face :background ,ctp-base)
1027               ;; (highlight-indent-guides-top-even-face :background ,ctp-base)
1028               (highlight-indent-guides-top-character-face :foreground ,ctp-pink)
1029               ;; (highlight-indent-guides-stack-odd-face :background ,ctp-base)
1030               ;; (highlight-indent-guides-stack-even-face :background ,ctp-base)
1031               (highlight-indent-guides-stack-character-face :foreground ,ctp-flamingo))))
1032
1033  (apply #'custom-theme-set-faces
1034         'catppuccin
1035         (let* ((expand-with-func
1036                 (lambda (func spec)
1037                   (let (reduced-color-list)
1038                     (dolist (col colors reduced-color-list)
1039                       (push (list (car col) (funcall func col))
1040                             reduced-color-list))
1041                     (eval `(let ,reduced-color-list
1042                              (backquote ,spec))))))
1043                whole-theme)
1044            (pcase-dolist (`(,face . ,spec) faces)
1045              (push `(,face
1046                      ((((min-colors 16777216)) ; fully graphical envs
1047                        ,(funcall expand-with-func 'cadr spec))
1048                       (t                       ; terminal with 256 colors
1049                        ,(funcall expand-with-func '(lambda (v) (cadr (cdr v))) spec))))
1050                    whole-theme))
1051            whole-theme))
1052
1053  (apply #'custom-theme-set-variables
1054         'catppuccin
1055         (let ((get-func
1056                (pcase (display-color-cells)
1057                  ((pred (<= 16777216)) 'car) ; fully graphical envs
1058                  (_ 'cadr))))                ; terminal withs 256 colors
1059           `((ansi-color-names-vector
1060              [,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-subtext1  'ctp-surface1) colors))
1061               ,(funcall get-func (alist-get 'ctp-red colors))
1062               ,(funcall get-func (alist-get 'ctp-green colors))
1063               ,(funcall get-func (alist-get 'ctp-yellow colors))
1064               ,(funcall get-func (alist-get 'ctp-blue colors))
1065               ,(funcall get-func (alist-get 'ctp-pink colors))
1066               ,(funcall get-func (alist-get 'ctp-teal colors))
1067               ,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-surface2  'ctp-subtext1) colors))]))
1068           `((rustic-ansi-faces
1069              (vector
1070                ,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-subtext1  'ctp-surface1) colors))
1071                ,(funcall get-func (alist-get 'ctp-red colors))
1072                ,(funcall get-func (alist-get 'ctp-green colors))
1073                ,(funcall get-func (alist-get 'ctp-yellow colors))
1074                ,(funcall get-func (alist-get 'ctp-blue colors))
1075                ,(funcall get-func (alist-get 'ctp-pink colors))
1076                ,(funcall get-func (alist-get 'ctp-teal colors))
1077                ,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-surface2  'ctp-subtext1) colors))))))))
1078
1079
1080
1081
1082;;;###autoload
1083(when load-file-name
1084  (add-to-list 'custom-theme-load-path
1085               (file-name-as-directory (file-name-directory load-file-name))))
1086
1087(provide-theme 'catppuccin)
1088
1089;; Unbind functions used for internal use
1090(fmakunbound 'catppuccin-quantize-color)
1091(fmakunbound 'catppuccin-lighten-color)
1092(fmakunbound 'catppuccin-darken-color)
1093
1094;; Local Variables:
1095;; indent-tabs-mode: nil
1096;; End:
1097
1098;;; catppuccin-theme.el ends here