diff options
Diffstat (limited to 'etc/themes/modus-vivendi-theme.el')
-rw-r--r-- | etc/themes/modus-vivendi-theme.el | 390 |
1 files changed, 365 insertions, 25 deletions
diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index 6b365f421cc..5012f8fb7f8 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -1,14 +1,11 @@ ;;; modus-vivendi-theme.el --- Elegant, highly legible and customizable dark theme -*- lexical-binding:t -*- -;; Copyright (C) 2019-2023 Free Software Foundation, Inc. +;; Copyright (C) 2019-2023 Free Software Foundation, Inc. ;; Author: Protesilaos Stavrou <info@protesilaos.com> ;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht> ;; URL: https://git.sr.ht/~protesilaos/modus-themes ;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes -;; Version: 3.0.0 -;; Package-Requires: ((emacs "27.1")) -;; Keywords: faces, theme, accessibility ;; This file is part of GNU Emacs. @@ -27,26 +24,11 @@ ;;; Commentary: ;; -;; Modus Vivendi is the dark variant of the Modus themes (Modus Operandi -;; is the light one). The themes are designed for color-contrast -;; accessibility. More specifically: -;; -;; 1. Provide a consistent minimum contrast ratio between background -;; and foreground values of 7:1 or higher. This meets the highest -;; such accessibility criterion per the guidelines of the Worldwide -;; Web Consortium's Working Group on Accessibility (WCAG AAA -;; standard). -;; -;; 2. Offer as close to full face coverage as possible. The list is -;; already quite long, with more additions to follow as part of the -;; ongoing development process. -;; -;; For a complete view of the project, also refer to the following files -;; (should be distributed in the same repository/directory as the -;; current item): -;; -;; - modus-themes.el (Main code shared between the themes) -;; - modus-operandi-theme.el (Light theme) +;; The Modus themes conform with the highest standard for +;; color-contrast accessibility between background and foreground +;; values (WCAG AAA). Please refer to the official Info manual for +;; further documentation (distributed with the themes, or available +;; at: <https://protesilaos.com/emacs/modus-themes>). ;;; Code: @@ -67,7 +49,365 @@ between background and foreground in any given piece of text, which corresponds to a minimum contrast in relative luminance of 7:1 (WCAG AAA standard).") - (modus-themes-theme modus-vivendi) + (defconst modus-vivendi-palette + '( +;;; Basic values + + (bg-main "#000000") + (bg-dim "#1e1e1e") + (fg-main "#ffffff") + (fg-dim "#989898") + (fg-alt "#c6daff") + (bg-active "#535353") + (bg-inactive "#303030") + (border "#646464") + +;;; Common accent foregrounds + + (red "#ff5f59") + (red-warmer "#ff6b55") + (red-cooler "#ff7f9f") + (red-faint "#ff9580") + (red-intense "#ff5f5f") + (green "#44bc44") + (green-warmer "#70b900") + (green-cooler "#00c06f") + (green-faint "#88ca9f") + (green-intense "#44df44") + (yellow "#d0bc00") + (yellow-warmer "#fec43f") + (yellow-cooler "#dfaf7a") + (yellow-faint "#d2b580") + (yellow-intense "#efef00") + (blue "#2fafff") + (blue-warmer "#79a8ff") + (blue-cooler "#00bcff") + (blue-faint "#82b0ec") + (blue-intense "#338fff") + (magenta "#feacd0") + (magenta-warmer "#f78fe7") + (magenta-cooler "#b6a0ff") + (magenta-faint "#caa6df") + (magenta-intense "#ff66ff") + (cyan "#00d3d0") + (cyan-warmer "#4ae2f0") + (cyan-cooler "#6ae4b9") + (cyan-faint "#9ac8e0") + (cyan-intense "#00eff0") + +;;; Uncommon accent foregrounds + + (rust "#db7b5f") + (gold "#c0965b") + (olive "#9cbd6f") + (slate "#76afbf") + (indigo "#9099d9") + (maroon "#cf7fa7") + (pink "#d09dc0") + +;;; Common accent backgrounds + + (bg-red-intense "#9d1f1f") + (bg-green-intense "#2f822f") + (bg-yellow-intense "#7a6100") + (bg-blue-intense "#1640b0") + (bg-magenta-intense "#7030af") + (bg-cyan-intense "#2266ae") + + (bg-red-subtle "#620f2a") + (bg-green-subtle "#00422a") + (bg-yellow-subtle "#4a4000") + (bg-blue-subtle "#242679") + (bg-magenta-subtle "#552f5f") + (bg-cyan-subtle "#004065") + + (bg-red-nuanced "#2c0614") + (bg-green-nuanced "#001904") + (bg-yellow-nuanced "#221000") + (bg-blue-nuanced "#0f0e39") + (bg-magenta-nuanced "#230631") + (bg-cyan-nuanced "#041529") + +;;; Uncommon accent backgrounds + + (bg-ochre "#442c2f") + (bg-lavender "#38325c") + (bg-sage "#0f3d30") + +;;; Graphs + + (bg-graph-red-0 "#b52c2c") + (bg-graph-red-1 "#702020") + (bg-graph-green-0 "#4fd100") + (bg-graph-green-1 "#007800") + (bg-graph-yellow-0 "#f1e00a") + (bg-graph-yellow-1 "#b08600") + (bg-graph-blue-0 "#2fafef") + (bg-graph-blue-1 "#1f2f8f") + (bg-graph-magenta-0 "#bf94fe") + (bg-graph-magenta-1 "#5f509f") + (bg-graph-cyan-0 "#47dfea") + (bg-graph-cyan-1 "#00808f") + +;;; Special purpose + + (bg-completion "#2f447f") + (bg-hover "#004f70") + (bg-hover-secondary "#654a39") + (bg-hl-line "#2f3849") + (bg-region "#5a5a5a") + (fg-region "#ffffff") + + (bg-char-0 "#0050af") + (bg-char-1 "#7f1f7f") + (bg-char-2 "#625a00") + + (bg-mode-line-active "#505050") + (fg-mode-line-active "#ffffff") + (border-mode-line-active "#959595") + (bg-mode-line-inactive "#2d2d2d") + (fg-mode-line-inactive "#969696") + (border-mode-line-inactive "#606060") + + (modeline-err "#ffa9bf") + (modeline-warning "#dfcf43") + (modeline-info "#9fefff") + + (bg-tab-bar "#313131") + (bg-tab-current "#000000") + (bg-tab-other "#545454") + +;;; Diffs + + (bg-added "#00381f") + (bg-added-faint "#002910") + (bg-added-refine "#034f2f") + (bg-added-fringe "#237f3f") + (fg-added "#a0e0a0") + (fg-added-intense "#80e080") + + (bg-changed "#363300") + (bg-changed-faint "#2a1f00") + (bg-changed-refine "#4a4a00") + (bg-changed-fringe "#8a7a00") + (fg-changed "#efef80") + (fg-changed-intense "#c0b05f") + + (bg-removed "#4f1119") + (bg-removed-faint "#380a0f") + (bg-removed-refine "#781a1f") + (bg-removed-fringe "#b81a1f") + (fg-removed "#ffbfbf") + (fg-removed-intense "#ff9095") + + (bg-diff-context "#1a1a1a") + +;;; Paren match + + (bg-paren-match "#2f7f9f") + (bg-paren-expression "#453040") + (underline-paren-match unspecified) + +;;; Mappings + +;;;; General mappings + + (fringe bg-dim) + (cursor fg-main) + + (keybind blue-cooler) + (name magenta) + (identifier yellow-faint) + + (err red) + (warning yellow-warmer) + (info cyan-cooler) + + (underline-err red-intense) + (underline-warning yellow) + (underline-note cyan) + +;;;; Code mappings + + (builtin magenta-warmer) + (comment fg-dim) + (constant blue-cooler) + (docstring cyan-faint) + (docmarkup magenta-faint) + (fnname magenta) + (keyword magenta-cooler) + (preprocessor red-cooler) + (string blue-warmer) + (type cyan-cooler) + (variable cyan) + (rx-construct green-cooler) + (rx-backslash magenta) + +;;;; Accent mappings + + (accent-0 blue-cooler) + (accent-1 magenta-warmer) + (accent-2 cyan-cooler) + (accent-3 yellow) + +;;;; Button mappings + + (fg-button-active fg-main) + (fg-button-inactive fg-dim) + (bg-button-active bg-active) + (bg-button-inactive bg-dim) + +;;;; Completion mappings + + (fg-completion-match-0 blue-cooler) + (fg-completion-match-1 magenta-warmer) + (fg-completion-match-2 cyan-cooler) + (fg-completion-match-3 yellow) + (bg-completion-match-0 unspecified) + (bg-completion-match-1 unspecified) + (bg-completion-match-2 unspecified) + (bg-completion-match-3 unspecified) + +;;;; Date mappings + + (date-common cyan) + (date-deadline red) + (date-event fg-alt) + (date-holiday magenta) + (date-now fg-main) + (date-scheduled yellow-warmer) + (date-weekday cyan) + (date-weekend red-faint) + +;;;; Line number mappings + + (fg-line-number-inactive fg-dim) + (fg-line-number-active fg-main) + (bg-line-number-inactive bg-dim) + (bg-line-number-active bg-active) + +;;;; Link mappings + + (fg-link blue-warmer) + (bg-link unspecified) + (underline-link blue-warmer) + + (fg-link-symbolic cyan) + (bg-link-symbolic unspecified) + (underline-link-symbolic cyan) + + (fg-link-visited magenta) + (bg-link-visited unspecified) + (underline-link-visited magenta) + +;;;; Mail mappings + + (mail-cite-0 blue-warmer) + (mail-cite-1 yellow-cooler) + (mail-cite-2 cyan-cooler) + (mail-cite-3 red-cooler) + (mail-part blue) + (mail-recipient magenta-cooler) + (mail-subject magenta-warmer) + (mail-other magenta-faint) + +;;;; Prompt mappings + + (fg-prompt cyan-cooler) + (bg-prompt unspecified) + +;;;; Prose mappings + + (prose-block fg-dim) + (prose-code cyan-cooler) + (prose-done green) + (prose-macro magenta-cooler) + (prose-metadata fg-dim) + (prose-metadata-value fg-alt) + (prose-table fg-alt) + (prose-tag magenta-faint) + (prose-todo red) + (prose-verbatim magenta-warmer) + +;;;; Rainbow mappings + + (rainbow-0 fg-main) + (rainbow-1 magenta-intense) + (rainbow-2 cyan-intense) + (rainbow-3 red-warmer) + (rainbow-4 yellow-intense) + (rainbow-5 magenta-cooler) + (rainbow-6 green-intense) + (rainbow-7 blue-warmer) + (rainbow-8 magenta-warmer) + +;;;; Heading mappings + + (fg-heading-0 cyan-cooler) + (fg-heading-1 fg-main) + (fg-heading-2 yellow-faint) + (fg-heading-3 blue-faint) + (fg-heading-4 magenta) + (fg-heading-5 green-faint) + (fg-heading-6 red-faint) + (fg-heading-7 cyan-faint) + (fg-heading-8 fg-dim) + + (bg-heading-0 unspecified) + (bg-heading-1 unspecified) + (bg-heading-2 unspecified) + (bg-heading-3 unspecified) + (bg-heading-4 unspecified) + (bg-heading-5 unspecified) + (bg-heading-6 unspecified) + (bg-heading-7 unspecified) + (bg-heading-8 unspecified) + + (overline-heading-0 unspecified) + (overline-heading-1 unspecified) + (overline-heading-2 unspecified) + (overline-heading-3 unspecified) + (overline-heading-4 unspecified) + (overline-heading-5 unspecified) + (overline-heading-6 unspecified) + (overline-heading-7 unspecified) + (overline-heading-8 unspecified)) + "The entire palette of the `modus-vivendi' theme. + +Named colors 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 named color that already +exists in the palette and is associated with a HEX-VALUE.") + + + (defcustom modus-vivendi-palette-overrides nil + "Overrides for `modus-vivendi-palette'. + +Mirror the elements of the aforementioned palette, overriding +their value. + +For overrides that are shared across all of the Modus themes, +refer to `modus-themes-common-palette-overrides'. + +Theme-specific overrides take precedence over shared overrides. +The idea of common overrides is to change semantic color +mappings, such as to make the cursor red. Wherea theme-specific +overrides can also be used to change the value of a named color, +such as what hexadecimal RGB value the red-warmer symbol +represents." + :group 'modus-themes + :package-version '(modus-themes . "4.0.0") + :version "30.1" + :type '(repeat (list symbol (choice symbol string))) + :set #'modus-themes--set-option + :initialize #'custom-initialize-default + :link '(info-link "(modus-themes) Palette overrides")) + + (modus-themes-theme modus-vivendi + modus-vivendi-palette + modus-vivendi-palette-overrides) (provide-theme 'modus-vivendi)) |