Files
dotfiles/config/emacs/themes/ef-catppuccin-mocha-theme.el
steveandgitadmin 02a5e0df28 init: new dotfile configuration
Remove all org files using a new script to more config over, The old org
file configuaration were great but required org. This new version only
requires the scripts that is included in the repo.

The configuration are all done but have not ported the theming system
yet.

Signed-off-by: Steve Beaulac <steve@sagacity.ca>
Change-Id: I14cd7fe058a71c8ba9d6d35397dc8d7e6a6a6964
2026-03-02 13:26:21 -05:00

438 lines
12 KiB
EmacsLisp

;;; ef-catppuccin-mocha-theme.el --- implementation of catppuccin-mocha theme using ef-themes -*- lexical-binding:t -*-
;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
;; Author: Steve Beaulac <steve@beaulac.me>
;; Maintainer: Steve Beaulac <steve@beaulac.me>
;; URL: https://github.com/SjB/ef-catppuccin
;; Keywords: faces, theme, accessibility
;; This file is NOT part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; The `ef-themes' are a collection of light and dark themes for GNU
;; Emacs whose goal is to provide colorful ("pretty") yet legible
;; options for users who want something with a bit more flair than the
;; `modus-themes' (also designed by me).
;;; Code:
(eval-and-compile
(require 'ef-themes)
(deftheme ef-catppuccin-mocha
"ef-themes of the catppuccin-mocha palette"
:background-mode 'dark
:kind 'color-scheme
:family 'ef)
(defconst ef-catppuccin-mocha-palette
'(
;;; Basic values
;;; Basic hues for foreground values
(crust "#11111b")
(mantle "#181825")
(base "#1e1e2e")
(surface0 "#313244")
(surface1 "#43465a")
(surface2 "#565970")
(overlay0 "#696d86")
(overlay1 "#7B819D")
(overlay2 "#8E95B3")
(text "#C6D0F5")
(subtext0 "#A1A8C9")
(subtext1 "#B3BCDF")
(rosewater "#f5e0dc")
(rosewater-warmer "#ffe0cf")
(rosewater-cooler "#e8e0e8")
(rosewater-faint "#ffffff")
(rosewater-intense "#fadcd6")
(bg-rosewater-intense "#88695f")
(bg-rosewater-subtle "#b44833")
(flamingo "#f2cdcd")
(flamingo-warmer "#fecdc0")
(flamingo-cooler "#e5cdd9")
(flamingo-faint "#fbf0f0")
(flamingo-intense "#f9c5c5")
(bg-flamingo-intense "#845a5a")
(bg-flamingo-subtle "#b12e2e")
(pink "#f5c2e7")
(pink-warmer "#ffc2da")
(pink-cooler "#e8c2f3")
(pink-faint "#fbe7f5")
(pink-intense "#fdb9eb")
(bg-pink-intense "#8e4c7c")
(bg-pink-subtle "#bc1e91")
(mauve "#cba6f7")
(mauve-warmer "#d7a6ea")
(mauve-cooler "#bea6ff")
(mauve-faint "#e1cbfa")
(mauve-intense "#ca9eff")
(bg-mauve-intense "#623a93")
(bg-mauve-subtle "#5f11bd")
(red "#f28ba8")
(red-warmer "#fe8b9b")
(red-cooler "#e58bb4")
(red-faint "#f5adc1")
(red-intense "#ff7ea2")
(bg-red-intense "#85384e")
(bg-red-subtle "#ab133e")
(maroon "#eba0ac")
(maroon-warmer "#f7a09f")
(maroon-cooler "#dea0b8")
(maroon-faint "#f1c0c8")
(maroon-intense "#f991a2")
(bg-maroon-intense "#7a4a51")
(bg-maroon-subtle "#a32236")
(peach "#fab387")
(peach-warmer "#ffb37a")
(peach-cooler "#edb393")
(peach-faint "#fbcaab")
(peach-intense "#ffb182")
(bg-peach-intense "#92532e")
(bg-peach-subtle "#b84b07")
(yellow "#f9e2af")
(yellow-warmer "#ffe2a2")
(yellow-cooler "#ece2bb")
(yellow-faint "#fbf0d6")
(yellow-intense "#ffe4a8")
(bg-yellow-intense "#997b3a")
(bg-yellow-subtle "#c58c0e")
(green "#a6e3a1")
(green-warmer "#b2e394")
(green-cooler "#99e3ad")
(green-faint "#c2ebbe")
(green-intense "#99f291")
(bg-green-intense "#546e53")
(bg-green-subtle "#34952c")
(teal "#94e2d5")
(teal-warmer "#a0e2c8")
(teal-cooler "#87e2e1")
(teal-faint "#b1e9e0")
(teal-intense "#83f2e0")
(bg-teal-intense "#4d6c67")
(bg-teal-subtle "#279381")
(blue "#87b0f9")
(blue-warmer "#93b0ec")
(blue-cooler "#7ab0ff")
(blue-faint "#abc8fa")
(blue-intense "#81aeff")
(bg-blue-intense "#30528f")
(bg-blue-subtle "#0947b6")
(sky "#89dceb")
(sky-warmer "#95dcde")
(sky-cooler "#7cdcf7")
(sky-faint "#a8e5f0")
(sky-intense "#77e7fc")
(bg-sky-intense "#407079")
(bg-sky-subtle "#1a8a9f")
(sapphire "#74c7ec")
(sapphire-warmer "#80c7df")
(sapphire-cooler "#67c7f8")
(sapphire-faint "#92d3f0")
(sapphire-intense "#61ceff")
(bg-sapphire-intense "#386377")
(bg-sapphire-subtle "#15719a")
(lavender "#b4befe")
(lavender-warmer "#c0bef1")
(lavender-cooler "#a7beff")
(lavender-faint "#dee3fe")
(lavender-intense "#b3bdff")
(bg-lavender-intense "#2f40a8")
(bg-lavender-subtle "#021fd6")
;;; remaping colors to properties
(bg-main base)
(bg-dim mantle)
(bg-alt crust)
(fg-main text)
(fg-dim subtext0)
(fg-alt subtext1)
(bg-inactive surface0)
(bg-active surface1)
;;; mauve is replacing magenta
(magenta mauve)
(magenta-warmer mauve-warmer)
(magenta-cooler mauve-cooler)
(magenta-faint mauve-faint)
(bg-magenta-intense bg-mauve-intense)
(bg-magenta-subtle bg-mauve-subtle)
;;; sapphire is replacing cyan
(cyan sapphire)
(cyan-warmer sapphire-warmer)
(cyan-cooler sapphire-cooler)
(cyan-faint sapphire-faint)
(bg-cyan-intense bg-sapphire-intense)
(bg-cyan-subtle bg-sapphire-subtle)
;;; Diffs
(bg-added bg-active)
(bg-added-faint bg-inactive)
(bg-added-refine bg-green-subtle)
(fg-added green)
(bg-changed bg-active)
(bg-changed-faint bg-inactive)
(bg-changed-refine bg-blue-subtle)
(fg-changed blue)
(bg-removed bg-active)
(bg-removed-faint bg-inactive)
(bg-removed-refine bg-red-subtle)
(fg-removed red)
;;; Graphs
(bg-graph-red-0 bg-maroon-subtle)
(bg-graph-red-1 bg-maroon-intense)
(bg-graph-green-0 bg-teal-subtle)
(bg-graph-green-1 bg-teal-intense)
(bg-graph-yellow-0 bg-rosewater-subtle)
(bg-graph-yellow-1 bg-rosewater-intense)
(bg-graph-blue-0 bg-sky-subtle)
(bg-graph-blue-1 bg-sky-intense)
(bg-graph-magenta-0 bg-pink-subtle)
(bg-graph-magenta-1 bg-pink-intense)
(bg-graph-cyan-0 bg-lavender-subtle)
(bg-graph-cyan-1 bg-lavender-intense)
;;; Special hues
(bg-mode-line mantle)
(fg-mode-line text)
(bg-completion overlay0)
(bg-hover overlay1)
(bg-hover-secondary overlay2)
(bg-hl-line crust)
(bg-region overlay2)
(bg-paren surface2)
(bg-err bg-red-intense) ; check with err
(bg-warning bg-yellow-intense) ; check with warning
(bg-info bg-green-intense) ; check with info
(border lavender)
(cursor rosewater)
(fg-intense subtext1)
(modeline-err red)
(modeline-warning yellow)
(modeline-info green)
(underline-err red-intense)
(underline-warning yellow-intense)
(underline-info green-intense)
(bg-char-0 surface0)
(bg-char-1 surface1)
(bg-char-2 surface2)
;;; Conditional hues
(bg-region-intense bg-lavender-intense)
(fg-region crust)
;;; Mappings
;;;; General mappings
(bg-fringe bg-main)
(fg-fringe fg-main)
(err red)
(warning yellow)
(info green)
(link blue)
(link-alt lavender)
(name green)
(keybind teal)
(identifier sapphire)
(prompt flamingo)
;;;; Code mappings
(builtin red)
(comment overlay0)
(constant peach)
(fnname flamingo)
(keyword mauve)
(preprocessor sky)
(docstring sapphire)
(string green)
(type yellow)
(variable green)
(rx-escape rosewater) ; compare with `string'
(rx-construct maroon)
;;;; Accent mappings
(accent-0 blue)
(accent-1 mauve)
(accent-2 green)
(accent-3 red)
;;;; Date mappings
(date-common green-cooler)
(date-deadline red-warmer)
(date-event fg-alt)
(date-holiday mauve-faint)
(date-now fg-main)
(date-range fg-alt)
(date-scheduled yellow)
(date-weekday sapphire)
(date-weekend red-faint)
;;;; Prose mappings
(prose-code mauve-warmer)
(prose-done green)
(prose-macro green-cooler)
(prose-metadata fg-dim)
(prose-metadata-value fg-alt)
(prose-table fg-alt)
(prose-table-formula err)
(prose-tag yellow-faint)
(prose-todo red-warmer)
(prose-verbatim blue)
;;;; Mail mappings
(mail-cite-0 blue)
(mail-cite-1 mauve-warmer)
(mail-cite-2 green-cooler)
(mail-cite-3 yellow-cooler)
(mail-part mauve-faint)
(mail-recipient blue-warmer)
(mail-subject blue-cooler)
(mail-other sapphire)
;;;; Search mappings
(bg-search-match bg-warning)
(bg-search-current bg-yellow-intense)
(bg-search-lazy bg-blue-intense)
(bg-search-replace bg-red-intense)
(bg-search-rx-group-0 bg-magenta-intense)
(bg-search-rx-group-1 bg-green-intense)
(bg-search-rx-group-2 bg-red-subtle)
(bg-search-rx-group-3 bg-cyan-subtle)
;;;; Space mappings
(bg-space unspecified)
(fg-space border)
(bg-space-err bg-maroon-intense)
;;;; Tab mappings
(bg-tab-bar bg-alt)
(bg-tab-current bg-main)
(bg-tab-other bg-active)
;;;; Terminal mappings
(bg-term-black "black")
(fg-term-black "black")
(bg-term-black-bright "gray35")
(fg-term-black-bright "gray35")
(bg-term-red red-cooler)
(fg-term-red red-cooler)
(bg-term-red-bright red-warmer)
(fg-term-red-bright red-warmer)
(bg-term-green green)
(fg-term-green green)
(bg-term-green-bright green-warmer)
(fg-term-green-bright green-warmer)
(bg-term-yellow yellow)
(fg-term-yellow yellow)
(bg-term-yellow-bright yellow-warmer)
(fg-term-yellow-bright yellow-warmer)
(bg-term-blue blue-warmer)
(fg-term-blue blue-warmer)
(bg-term-blue-bright blue-cooler)
(fg-term-blue-bright blue-cooler)
(bg-term-magenta magenta)
(fg-term-magenta magenta)
(bg-term-magenta-bright magenta-cooler)
(fg-term-magenta-bright magenta-cooler)
(bg-term-cyan cyan)
(fg-term-cyan cyan)
(bg-term-cyan-bright cyan-cooler)
(fg-term-cyan-bright cyan-cooler)
(bg-term-white "gray65")
(fg-term-white "gray65")
(bg-term-white-bright "white")
(fg-term-white-bright "white")
;;;; Rainbow mappings
(rainbow-0 marroon)
(rainbow-1 red)
(rainbow-2 peach)
(rainbow-3 yellow)
(rainbow-4 green)
(rainbow-5 sapphire)
(rainbow-6 lavender)
(rainbow-7 sky)
(rainbow-8 teal))
"The `ef-catppuccin-mocha' palette.
Color values have the form (COLOR-NAME HEX-VALUE) with the former
as a symbol and the latter as a string.
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
with both as symbols. The latter is a color that already exists
in the palette and is associated with a HEX-VALUE.")
(defcustom ef-catppuccin-mocha-palette-overrides nil
"Overrides for `ef-catppuccin-mocha-palette'.
Mirror the elements of the aforementioned palette, overriding
their value.
For overrides that are shared across all of the Ef themes,
refer to `ef-themes-common-palette-overrides'.
To preview the palette entries, use `ef-themes-preview-colors' or
`ef-themes-preview-colors-current' (read the documentation for
further details)."
:group 'ef-themes
:package-version '(ef-themes . "1.0.0")
:type '(repeat (list symbol (choice symbol string)))
:link '(info-link "(ef-themes) Palette overrides"))
(ef-themes-theme ef-catppuccin-mocha ef-catppuccin-mocha-palette ef-catppuccin-mocha-palette-overrides)
(provide-theme 'ef-catppuccin-mocha))