From 612d593eaa87ce66a0999045136abb03acb63343 Mon Sep 17 00:00:00 2001 Message-Id: <612d593eaa87ce66a0999045136abb03acb63343.1621937281.git.info@protesilaos.com> From: Protesilaos Stavrou Date: Tue, 25 May 2021 13:07:42 +0300 Subject: [PATCH] Update modus-themes to version 1.4.0 * etc/themes/modus-themes.el: Add new defcustom forms and update existing ones, edit doc strings, remove old obsolete aliases, tweak internal functions, refine face specifications. * etc/themes/modus-operandi-theme.el: Bump version number. * etc/themes/modus-vivendi-theme.el: Bump version number. * doc/misc/modus-themes.org: (Overview): Document good support for cases with red-green color deficiency (deuteranopia). (Customization Options): Add code block with sample configuration. (Option for mode line presentation): Document new values. (Option for completion framework aesthetics): Reword statements. (Option for mail citations): Include new customization. (Option for line highlighting (hl-line-mode)): Change description of possible value. (Option for diff buffer looks): Update the meaning of 'fg-only', which now is an alias for 'fg-only-deuteranopia'. (Option for org-mode block styles): Rename possible values. (Cycle through arbitrary colors (DIY)): Include code samples for demo case. (Override colors (DIY)): Use correct symbol. (Override color saturation (DIY)): Show how to combine manual and automatic color overrides. (Update Org block delimiter fontification (DIY)): Provide example. (Load theme depending on time of day): Include missing "DIY" label. (Full support for packages or face groups): Update list with additions, removals. (Indirectly covered packages): Update list. (Notes for individual packages) (Note on dimmer.el) (Note on display-fill-column-indicator-mode) (Note on mmm-mode.el background colors) (Note on prism.el) (Note on ERC escaped color sequences) (Note on powerline or spaceline) (Note on Helm grep) (Note on EWW and Elfeed fonts (SHR fonts)): Stylistic change to the heading. (Note on inline Latex in Org buffers) (Note on god-mode.el): Add note. (Frequently Asked Questions (FAQ)): Include new section. (Acknowledgements): Update list of contributors. --- doc/misc/modus-themes.org | 889 ++++++++++++++++++--- etc/themes/modus-operandi-theme.el | 2 +- etc/themes/modus-themes.el | 1198 +++++++++++++++------------- etc/themes/modus-vivendi-theme.el | 2 +- 4 files changed, 1408 insertions(+), 683 deletions(-) diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index 001ed57218..e6bcc743d8 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -3,10 +3,11 @@ #+email: info@protesilaos.com #+language: en #+options: ':t toc:nil author:t email:t +#+startup: content -#+macro: stable-version 1.3.2 -#+macro: release-date 2021-04-18 -#+macro: development-version 1.4.0-dev +#+macro: stable-version 1.4.0 +#+macro: release-date 2021-05-25 +#+macro: development-version 1.5.0-dev #+macro: export-date (eval (format-time-string "%F %R %z" (current-time))) #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ #+macro: space @@texinfo:@: @@ @@ -82,6 +83,11 @@ * Overview themes strive to achieve as close to full face coverage as possible ([[#h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19][Face coverage]]). +Furthermore, the themes are designed to empower users with red-green +color deficiency (deuteranopia). This is achieved through customization +options which have the effect of replacing all relevant instances of +green with a variant of blue ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). + Starting with version 0.12.0 and onwards, the themes are built into GNU Emacs. @@ -367,6 +373,113 @@ * Customization Options Remember that all customization options must be evaluated before loading a theme ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]). +Below is a summary of what you will learn in the subsequent sections of +this manual. + +#+begin_src emacs-lisp +(setq modus-themes-slanted-constructs t + modus-themes-bold-constructs nil + modus-themes-no-mixed-fonts nil + modus-themes-subtle-line-numbers nil + modus-themes-success-deuteranopia t + + modus-themes-fringes nil ; {nil,'subtle,'intense} + + ;; Options for `modus-themes-lang-checkers': nil, + ;; 'straight-underline, 'subtle-foreground, + ;; 'subtle-foreground-straight-underline, 'intense-foreground, + ;; 'intense-foreground-straight-underline, 'colored-background + modus-themes-lang-checkers nil + + ;; Options for `modus-themes-mode-line': nil, '3d, 'moody, + ;; 'borderless, 'borderless-3d, 'borderless-moody, 'accented, + ;; 'accented-3d, 'accented-moody, 'borderless-accented, + ;; 'borderless-accented-3d, 'borderless-accented-moody + modus-themes-mode-line '3d + + ;; Options for `modus-themes-syntax': nil, 'faint, + ;; 'yellow-comments, 'green-strings, + ;; 'yellow-comments-green-strings, 'alt-syntax, + ;; 'alt-syntax-yellow-comments, 'faint-yellow-comments + modus-themes-syntax nil + + ;; Options for `modus-themes-hl-line': nil, 'intense-background, + ;; 'accented-background, 'underline-neutral, + ;; 'underline-accented, 'underline-only-neutral, + ;; 'underline-only-accented + modus-themes-hl-line 'underline-neutral + + modus-themes-paren-match 'subtle-bold ; {nil,'subtle-bold,'intense,'intense-bold} + + ;; Options for `modus-themes-links': nil, 'faint, + ;; 'neutral-underline, 'faint-neutral-underline, 'no-underline, + ;; 'underline-only, 'neutral-underline-only + modus-themes-links 'neutral-underline + + ;; Options for `modus-themes-prompts': nil, 'subtle-accented, + ;; 'intense-accented, 'subtle-gray, 'intense-gray + modus-themes-prompts 'subtle-gray + + modus-themes-completions 'moderate ; {nil,'moderate,'opinionated} + + modus-themes-mail-citations nil ; {nil,'faint,'monochrome} + + ;; Options for `modus-themes-region': nil, 'no-extend, 'bg-only, + ;; 'bg-only-no-extend, 'accent, 'accent-no-extend + modus-themes-region 'bg-only-no-extend + + ;; Options for `modus-themes-diffs': nil, 'desaturated, + ;; 'bg-only, 'deuteranopia, 'fg-only-deuteranopia + modus-themes-diffs 'fg-only-deuteranopia + + modus-themes-org-blocks 'gray-background ; {nil,'gray-background,'tinted-background} + modus-themes-org-habit nil ; {nil,'simplified,'traffic-light} + + modus-themes-headings ; this is an alist: read the manual or its doc string + '((1 . line) + (2 . rainbow-line-no-bold) + (t . no-bold)) + + modus-themes-variable-pitch-ui nil + modus-themes-variable-pitch-headings t + modus-themes-scale-headings t + modus-themes-scale-1 1.1 + modus-themes-scale-2 1.15 + modus-themes-scale-3 1.21 + modus-themes-scale-4 1.27 + modus-themes-scale-5 1.33) +#+end_src + +** Option for color-coding success state (deuteranopia) +:properties: +:alt_title: Success' color-code +:description: Toggle blue color for success or done states +:custom_id: h:3ed03a48-20d8-4ce7-b214-0eb7e4c79abe +:end: +#+vindex: modus-themes-success-deuteranopia + +Symbol: ~modus-themes-success-deuteranopia~ + +Possible values: + +1. ~nil~ (default) +2. ~t~ + +The default is to colorise all faces that denote "success", "done", or +similar with a variant of green. + +With a non-nil value (~t~), use variants of blue instead of green. This +is meant to empower users with red-green color deficiency. + +The present customization option should apply to all contexts where +there can be a color-coded distinction between success and failure, +to-do and done, and so on. + +Diffs, which have a red/green dichotomy by default, can also be +configured to conform with deuteranopia. + +[[#h:ea7ac54f-5827-49bd-b09f-62424b3b6427][Option for diff buffer looks]]. + ** Option for more bold constructs :properties: :alt_title: Bold constructs @@ -591,21 +704,24 @@ ** Option for mode line presentation 7. ~accented~ 8. ~accented-3d~ 9. ~accented-moody~ +10. ~borderless-accented~ +11. ~borderless-accented-3d~ +12. ~borderless-accented-moody~ The default produces a two-dimensional effect both for the active and -inactive modelines. The differences between the two are limited to +inactive mode lines. The differences between the two are limited to distinct shades of grayscale values, with the active being more intense than the inactive. -Option ~3d~ will make the active modeline look like a three-dimensional -rectangle. Inactive modelines remain 2D, though they are slightly toned -down relative to the default. This aesthetic is virtually the same as -what you get when you run Emacs without any customizations (=emacs -Q= on -the command line). +Option ~3d~ will make the active mode line look like a three-dimensional +rectangle. Inactive mode lines remain 2D, though they are slightly +toned down relative to the default. This aesthetic is virtually the +same as what you get when you run Emacs without any customizations +(=emacs -Q= on the command line). -While ~moody~ removes all box effects from the modelines and applies +While ~moody~ removes all box effects from the mode lines and applies underline and overline properties instead. It also tones down a bit the -inactive modelines. This is meant to optimize things for use with the +inactive mode lines. This is meant to optimize things for use with the [[https://github.com/tarsius/moody][moody package]] (hereinafter referred to as "Moody"), though it can work fine even without it. @@ -616,7 +732,7 @@ ** Option for mode line presentation The ~borderless-3d~ and ~borderless-moody~ approximate the ~3d~ and ~moody~ options respectively, while removing the borders. However, to ensure -that the inactive modelines remain visible, they apply a slightly more +that the inactive mode lines remain visible, they apply a slightly more prominent background to them than what their counterparts do (same inactive background as with the default). @@ -625,12 +741,17 @@ ** Option for mode line presentation mode line uses a colored background instead of the standard shade of gray. +Same principle for ~borderless-accented~, ~borderless-accented-3d~, and +~borderless-accented-moody~ which use a colored background for the active +mode line and have no discernible borders around both the active and +inactive the mode lines. + Note that Moody does not expose any faces that the themes could style directly. Instead it re-purposes existing ones to render its tabs and ribbons. As such, there may be cases where the contrast ratio falls below the 7:1 target that the themes conform with (WCAG AAA). To hedge against this, we configure a fallback foreground for the ~moody~ option, -which will come into effect when the background of the modeline changes +which will come into effect when the background of the mode line changes to something less accessible, such as Moody ribbons (read the doc string of ~set-face-attribute~, specifically ~:distant-foreground~). This fallback is activated when Emacs determines that the background and foreground of @@ -671,11 +792,12 @@ ** Option for completion framework aesthetics on their default aesthetics: (i) those that only or mostly use foreground colors for their interaction model, and (ii) those that combine background and foreground values for some of their metaphors. -The former category encompasses Icomplete, Ido, Selectrum as well as -pattern matching styles like Orderless and Flx. The latter covers Helm, -Ivy, and similar. +The former category encompasses Icomplete, Ido, Selectrum, Vertico, as +well as pattern matching styles like Orderless and Flx. The latter +covers Helm, Ivy, and Sallet. -A value of ~nil~ will respect the metaphors of each completion framework. +A value of ~nil~ (the default) will simply respect the metaphors of each +completion framework. Option ~moderate~ applies a combination of background and foreground that is fairly subtle. For Icomplete and friends this constitutes a @@ -694,6 +816,35 @@ ** Option for completion framework aesthetics some time with every one of the ~nil~ (default), ~moderate~, and ~opinionated~ possibilities. +** Option for mail citations +:properties: +:alt_title: Mail citations +:description: Choose among colorful, desaturated, monochrome citations +:custom_id: h:5a12765d-0ba0-4a75-ab11-e35d3bbb317d +:end: +#+vindex: modus-themes-mail-citations + +Symbol: ~modus-themes-mail-citations~ + +Possible values: + +1. ~nil~ (default) +2. ~faint~ +3. ~monochrome~ + +By default, citations in email-related buffers apply contrasting hues to +different levels of depth in cited text. The colors are fairly easy to +tell apart. + +A value of ~faint~ makes all citation levels less intense, while retaining +the default style of contrasting hues (albeit very subtle ones). + +Option ~monochrome~ turns all citations in to a uniform shade of gray. + +Whatever the value assigned to this variable, citations in emails are +controlled by typographic elements or indentation, which the themes do +not touch. + ** Option for fringe visibility :properties: :alt_title: Fringes @@ -792,8 +943,8 @@ ** Option for line highlighting (hl-line-mode) The ~intense-background~ applies a more prominent gray to the background of the current line. -With ~accented-background~ the default's subtle aesthetic is retained, but -the background has a more colored hint. +With ~accented-background~ the background gets a colored hint and is more +prominent than the default. The ~underline-neutral~ combines the default subtle neutral background with a gray underline. @@ -926,53 +1077,42 @@ ** Option for diff buffer looks 1. ~nil~ (default) 2. ~desaturated~ -3. ~fg-only~ -4. ~bg-only~ -5. ~deuteranopia~ - -By default the themes apply rich coloration to the output of diffs, such -as those of ~diff-mode~, ~ediff~, ~smerge-mode~, and Magit. These are -color combinations of an accented background and foreground so that, for -example, added lines have a pronounced green background with an -appropriate shade of green for the affected text. Word-wise or -"refined" changes follow this pattern but use different shades of those -colors to remain distinct. - -Option ~desaturated~ tones down all relevant color values. It still -combines an accented background with an appropriate foreground, yet its -overall impression is fairly subtle. Refined changes are a bit more -intense to fulfil their intended function, though still less saturated -than default. - -Option ~fg-only~ will remove most accented backgrounds and instead rely -on color-coded text to denote changes. For instance, added lines use a -green foreground, while their background is the same as the rest of the -buffer. Word-wise highlights still use a background value which is, -nonetheless, more subtle than its default equivalent. - -Option ~bg-only~ applies color-coded backgrounds but does not override -any syntax highlighting that may be present. This makes it suitable for -use with a non-nil value for ~diff-font-lock-syntax~ (which is the -default for ~diff-mode~ buffers in Emacs 27 or higher). - -Option ~deuteranopia~ optimizes for red-green color deficiency. It -replaces all instances of green with blue variants. This is to ensure -that indicators for "removed" and "added" states are not mistaken for -each other. - -Concerning Magit, an extra set of tweaks are introduced for the effect -of highlighting the current diff hunk, so as to remain aligned with the -overall experience of that mode. Expect changes that are consistent -with the overall intent of the aforementioned. Note, however, that the -~bg-only~ option will not deliver the intended results in Magit diffs -because no syntax highlighting is used there (last checked with Magit -version 20201116.1057, though upstream has a plan to eventually support -such a feature---this entry shall be updated accordingly). +3. ~bg-only~ +4. ~deuteranopia~ +5. ~fg-only-deuteranopia~ + +The default (~nil~) uses fairly intense color combinations for diffs, by +applying prominently colored backgrounds, with appropriate foregrounds. + +Option ~desaturated~ follows the same principles as with the default +(~nil~), though it tones down all relevant colors. + +Option ~bg-only~ applies a background but does not override the text's +foreground. This makes it suitable for a non-nil value passed to +~diff-font-lock-syntax~ (note: Magit does not support syntax highlighting +in diffs---last checked on 2021-04-21). + +Option ~deuteranopia~ is like the default (~nil~) in terms of using +prominently colored backgrounds, except that it also accounts for +red-green color defficiency by replacing all instances of green with +colors on the blue side of the spectrum. Other stylistic changes are +made in the interest of optimizing for such a use-case. + +Option ~fg-only-deuteranopia~ removes all colored backgrounds, except from +word-wise or refined changes. Instead, it only uses color-coded +foreground values to differentiate between added, removed, and changed +lines. If a background is necessary to denote context, a subtle +grayscale value is applied. The color used for added lines is a variant +of blue to account for red-green color defficiency but also because +green text alone is hard to discern in the diff's context (hard for our +accessibility purposes). The ~fg-only~ option that existed in older +versions of the themes is now an alias of ~fg-only-deuteranopia~, in the +interest of backward compatibility. ** Option for org-mode block styles :properties: :alt_title: Org mode blocks -:description: Choose among plain, grayscale, or rainbow styles +:description: Choose among plain, gray, or tinted backgrounds :custom_id: h:b7e328c0-3034-4db7-9cdf-d5ba12081ca2 :end: #+vindex: modus-themes-org-blocks @@ -982,32 +1122,33 @@ ** Option for org-mode block styles Possible values: 1. ~nil~ (default) -2. ~grayscale~ -3. ~rainbow~ +2. ~gray-background~ (value ~grayscale~ exists for backward compatibility) +3. ~tinted-background~ (value ~rainbow~ exists for backward compatibility) -The default is to use the same background as the rest of the buffer for -the contents of the block. +The default means that the block has no distinct background of its own +and uses the one that applies to the rest of the buffer. -Option ~grayscale~ applies a subtle neutral gray background to the block's -contents. It will also extend to the edge of the window the background -of the "begin" and "end" block delimiter lines (only relevant for Emacs -versions >= 27 where the 'extend' keyword is part of the face -specifications). +Option ~gray-background~ applies a subtle gray background to the block's +contents. It also affects the begin and end lines of the block: their +background extends to the edge of the window for Emacs version >= 27 +where the ~:extend~ keyword is recognized by ~set-face-attribute~ (this is +contingent on the variable ~org-fontify-whole-block-delimiter-line~). -Option ~rainbow~ uses an accented background for the contents of the -block. The exact color will depend on the programming language and is -controlled by the ~org-src-block-faces~ variable. This is most suitable -for users who work on literate programming documents that mix and match -several languages. +Option ~tinted-background~ uses a slightly colored background for the +contents of the block. The exact color will depend on the programming +language and is controlled by the variable ~org-src-block-faces~ (refer to +the theme's source code for the current association list). For this to +take effect, Org must be restarted with {{{kbd(M-x org-mode-restart)}}}. -Note that the "rainbow" blocks may require you to also reload the -major-mode so that the colors are applied consistently throughout: use -{{{kbd(M-x org-mode)}}} or {{{kbd(M-x org-mode-restart)}}} to refresh the buffer. -Or start typing in each code block (inefficient at scale, but it still -works). +Code blocks use their major mode's colors only when the variable +~org-src-fontify-natively~ is non-nil. While quote/verse blocks require +setting ~org-fontify-quote-and-verse-blocks~ to a non-nil value. -The extent of Org block delimiter lines is controlled by the variable -~org-fontify-whole-block-delimiter-line~. +[[#h:f44cc6e3-b0f1-4a5e-8a90-9e48fa557b50][Update Org block delimiter fontification]]. + +Older versions of the themes provided options ~grayscale~ (or ~greyscale~) +and ~rainbow~. Those will continue to work as they are aliases for +~gray-background~ and ~tinted-background~, respectively. ** Option for org-habit graph styles :properties: @@ -1637,6 +1778,170 @@ ** Remap face with local value (DIY) functions that also accept an arbitrary face. We shall leave the experimentation up to you. +** Cycle through arbitrary colors (DIY) +:properties: +:custom_id: h:77dc4a30-b96a-4849-85a8-fee3c2995305 +:end: +#+cindex: Cycle colors + +Users may opt to customize individual faces of the themes to accommodate +their particular needs. One such case is with the color intensity of +comments, specifically the foreground of ~font-lock-comment-face~. The +Modus themes set that to a readable value, in accordance with their +accessibility objective, though users may prefer to lower the overall +contrast on an on-demand basis. + +One way to achieve this is to design a command that cycles through three +distinct levels of intensity, though the following can be adapted to any +kind of cyclic behaviour, such as to switch between red, green, and +blue. + +In the following example, we employ the ~modus-themes-color~ function +which reads a symbol that represents an entry in the active theme's +color palette ([[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Case-by-case face specs using the themes' palette]]). +Those are stored in ~my-modus-themes-comment-colors~. + +#+begin_src emacs-lisp +(defvar my-modus-themes-comment-colors + ;; We are abusing the palette here, as those colors have their own + ;; purpose in the palette, so please ignore the semantics of their + ;; names. + '((low . bg-region) + (medium . bg-tab-inactive-alt) + (high . fg-alt)) + "Alist of levels of intensity mapped to color palette entries. +The entries are found in `modus-themes-operandi-colors' or +`modus-themes-vivendi-colors'.") + +(defvar my-modus-themes--adjust-comment-color-state nil + "The cyclic state of `my-modus-themes-adjust-comment-color'. +For internal use.") + +(defun my-modus-themes--comment-foreground (degree state) + "Set `font-lock-comment-face' foreground. +Use `my-modus-themes-comment-colors' to extract the color value +for each level of intensity. + +This is complementary to `my-modus-themes-adjust-comment-color'." + (let ((palette-colors my-modus-themes-comment-colors)) + (set-face-foreground + 'font-lock-comment-face + (modus-themes-color (alist-get degree palette-colors))) + (setq my-modus-themes--adjust-comment-color-state state) + (message "Comments are set to %s contrast" degree))) + +(defun my-modus-themes-adjust-comment-color () + "Cycle through levels of intensity for comments. +The levels are determined by `my-modus-themes-comment-colors'." + (interactive) + (pcase my-modus-themes--adjust-comment-color-state + ('nil + (my-modus-themes--comment-foreground 'low 1)) + (1 + (my-modus-themes--comment-foreground 'medium 2)) + (_ + (my-modus-themes--comment-foreground 'high nil)))) +#+end_src + +With the above, {{{kbd(M-x my-modus-themes-adjust-comment-color)}}} will cycle +through the three levels of intensity that have been specified. + +Another approach is to not read from the active theme's color palette +and instead provide explicit color values, either in hexadecimal RGB +notation (like =#123456=) or as the names that are displayed in the output +of {{{kbd(M-x list-colors-display)}}}. In this case, the alist with the +colors will have to account for the active theme, so as to set the +appropriate colors. While this introduces a bit more complexity, it +ultimately offers greater flexibility on the choice of colors for such a +niche functionality (so there is no need to abuse the palette of the +active Modus theme): + +#+begin_src emacs-lisp +(defvar my-modus-themes-comment-colors + '((light . ((low . "gray75") + (medium . "gray50") + (high . "#505050"))) ; the default for `modus-operandi' + + (dark . ((low . "gray25") + (medium . "gray50") + (high . "#a8a8a8")))) ; the default for `modus-vivendi' + "Alist of levels of intensity mapped to color values. +For such colors, consult the command `list-colors-display'. Pass +the name of a color or its hex value.") + +(defvar my-modus-themes--adjust-comment-color-state nil + "The cyclic state of `my-modus-themes-adjust-comment-color'. +For internal use.") + +(defun my-modus-themes--comment-foreground (degree state) + "Set `font-lock-comment-face' foreground. +Use `my-modus-themes-comment-colors' to extract the color value +for each level of intensity. + +This is complementary to `my-modus-themes-adjust-comment-color'." + (let* ((colors my-modus-themes-comment-colors) + (levels (pcase (car custom-enabled-themes) + ('modus-operandi (alist-get 'light colors)) + ('modus-vivendi (alist-get 'dark colors))))) + (set-face-foreground + 'font-lock-comment-face + (alist-get degree levels)) + (setq my-modus-themes--adjust-comment-color-state state) + (message "Comments are set to %s contrast" degree))) + +(defun my-modus-themes-adjust-comment-color () + "Cycle through levels of intensity for comments. +The levels are determined by `my-modus-themes-comment-colors'." + (interactive) + (pcase my-modus-themes--adjust-comment-color-state + ('nil + (my-modus-themes--comment-foreground 'low 1)) + (1 + (my-modus-themes--comment-foreground 'medium 2)) + (_ + (my-modus-themes--comment-foreground 'high nil)))) +#+end_src + +The effect of the above configurations on ~font-lock-comment-face~ is +global. To make it buffer-local, one must tweak the code to employ the +function ~face-remap-add-relative~ ([[#h:7a93cb6f-4eca-4d56-a85c-9dcd813d6b0f][Remap face with local value]]). + +So this form in ~my-modus-themes--comment-foreground~: + +#+begin_src emacs-lisp +;; example 1 +(... + (set-face-foreground + 'font-lock-comment-face + (modus-themes-color (alist-get degree palette-colors))) + ...) + +;; example 2 +(... + (set-face-foreground + 'font-lock-comment-face + (alist-get degree levels)) + ...) +#+end_src + +Must become this: + +#+begin_src emacs-lisp +;; example 1 +(... + (face-remap-add-relative + 'font-lock-comment-face + `(:foreground ,(modus-themes-color (alist-get degree palette-colors)))) + ...) + +;; example 2 +(... + (face-remap-add-relative + 'font-lock-comment-face + `(:foreground ,(alist-get degree levels))) + ...) +#+end_src + ** Override colors (DIY) :properties: :custom_id: h:307d95dd-8dbd-4ece-a543-10ae86f155a6 @@ -1659,7 +1964,7 @@ ** Override colors (DIY) that can be overridden): #+begin_src emacs-lisp -(defconst modus-themes-colors-operandi +(defconst modus-themes-operandi-colors '((bg-main . "#ffffff") (bg-dim . "#f8f8f8") (bg-alt . "#f0f0f0") @@ -1808,9 +2113,59 @@ ** Override color saturation (DIY) Using the above has an immediate effect, as it reloads the active Modus theme. -To disable the effect, one must reset the aforementioned variables to -~nil~. Or specify a command for it, such as by taking inspiration from -the ~modus-themes-toggle~ we already provide: +The =my-modus-themes-saturate= function stores new color values in the +variables =modus-themes-operandi-color-overrides= and +=modus-themes-vivendi-color-overrides=, meaning that it undoes changes +implemented by the user on individual colors. To have both automatic +saturation adjustment across the board and retain per-case edits to the +palette, some tweaks to the above function are required. For example: + +#+begin_src emacs-lisp +(defvar my-modus-themes-vivendi-extra-color-overrides + '((fg-main . "#ead0c0") + (bg-main . "#050515")) + "My bespoke colors for `modus-vivendi'.") + +(defvar my-modus-themes-operandi-extra-color-overrides + '((fg-main . "#1a1a1a") + (bg-main . "#fefcf4")) + "My bespoke colors for `modus-operandi'.") + +(defun my-modus-themes-saturate (percent) + "Saturate current Modus theme palette overrides by PERCENT. +Preserve the color values stored in +`my-modus-themes-operandi-extra-color-overrides', +`my-modus-themes-vivendi-extra-color-overrides'." + (interactive + (list (read-number "Saturation by percent: "))) + (let* ((theme (modus-themes--current-theme)) + (palette (pcase theme + ('modus-operandi modus-themes-operandi-colors) + ('modus-vivendi modus-themes-vivendi-colors) + (_ (error "No Modus theme is active")))) + (overrides (pcase theme + ('modus-operandi 'modus-themes-operandi-color-overrides) + ('modus-vivendi 'modus-themes-vivendi-color-overrides) + (_ (error "No Modus theme is active")))) + (extra-overrides (pcase theme + ('modus-operandi my-modus-themes-operandi-extra-color-overrides) + ('modus-vivendi my-modus-themes-vivendi-extra-color-overrides) + (_ (error "No Modus theme is active"))))) + (let (name cons colors) + (dolist (cons palette) + (setq name (color-saturate-name (cdr cons) percent)) + (setq name (format "%s" name)) + (setq cons `(,(car cons) . ,name)) + (push cons colors)) + (set overrides (append extra-overrides colors))) + (pcase theme + ('modus-operandi (modus-themes-load-operandi)) + ('modus-vivendi (modus-themes-load-vivendi))))) +#+end_src + +To disable the effect, one must reset the aforementioned variables of +the themes to ~nil~. Or specify a command for it, such as by taking +inspiration from the ~modus-themes-toggle~ we already provide: #+begin_src emacs-lisp (defun my-modus-themes-revert-overrides () @@ -1959,6 +2314,48 @@ ** Custom Org user faces (DIY) [[#h:02e25930-e71a-493d-828a-8907fc80f874][Check color combinations]]. +** Update Org block delimiter fontification (DIY) +:properties: +:custom_id: h:f44cc6e3-b0f1-4a5e-8a90-9e48fa557b50 +:end: + +As noted in the section about ~modus-themes-org-blocks~, Org contains a +variable that determines whether the block's begin and end lines are +extended to the edge of the window ([[#h:b7e328c0-3034-4db7-9cdf-d5ba12081ca2][Option for org-mode block styles]]). +The variable is ~org-fontify-whole-block-delimiter-line~. + +Users who change the style of Org blocks from time to time may prefer to +automatically update delimiter line fontification, such as with the +following setup: + +#+begin_src emacs-lisp +(defun my-modus-themes-org-fontify-block-delimiter-lines () + "Match `org-fontify-whole-block-delimiter-line' to theme style. +Run this function at the post theme load phase, such as with the +`modus-themes-after-load-theme-hook'." + (if (eq modus-themes-org-blocks 'gray-background) + (setq org-fontify-whole-block-delimiter-line t) + (setq org-fontify-whole-block-delimiter-line nil))) + +(add-hook 'modus-themes-after-load-theme-hook + #'my-modus-themes-org-fontify-block-delimiter-lines) +#+end_src + +Then {{{kbd(M-x org-mode-restart)}}} for changes to take effect, though manual +intervention can be circumvented by tweaking the function thus: + +#+begin_src emacs-lisp +(defun my-modus-themes-org-fontify-block-delimiter-lines () + "Match `org-fontify-whole-block-delimiter-line' to theme style. +Run this function at the post theme load phase, such as with the +`modus-themes-after-load-theme-hook'." + (if (eq modus-themes-org-blocks 'gray-background) + (setq org-fontify-whole-block-delimiter-line t) + (setq org-fontify-whole-block-delimiter-line nil)) + (when (derived-mode-p 'org-mode) + (font-lock-flush))) +#+end_src + ** Measure color contrast (DIY) :properties: :custom_id: h:02e25930-e71a-493d-828a-8907fc80f874 @@ -2032,7 +2429,7 @@ ** Measure color contrast (DIY) Such knowledge may prove valuable while attempting to override some of the themes' colors: [[#h:307d95dd-8dbd-4ece-a543-10ae86f155a6][Override colors]]. -** Load theme depending on time of day +** Load theme depending on time of day (DIY) :properties: :custom_id: h:1d1ef4b4-8600-4a09-993c-6de3af0ddd26 :end: @@ -2210,6 +2607,7 @@ ** Full support for packages or face groups + bm + bongo + boon ++ bookmark + breakpoint (provided by the built-in {{{file(gdb-mi.el)}}} library) + buffer-expose + calendar and diary @@ -2229,7 +2627,6 @@ ** Full support for packages or face groups + corfu + counsel* + counsel-css -+ counsel-notmuch + counsel-org-capture-string + cov + cperl-mode @@ -2372,7 +2769,7 @@ ** Full support for packages or face groups + minibuffer-line + minimap + mmm-mode -+ modeline ++ mode-line + mood-line + moody + mpdel @@ -2475,8 +2872,8 @@ ** Full support for packages or face groups + tuareg + typescript + undo-tree -+ vc (built-in mode line status for version control) -+ vc-annotate (the out put of {{{kbd(C-x v g)}}}) ++ vc (vc-dir.el, vc-hooks.el) ++ vc-annotate (the output of {{{kbd(C-x v g)}}}) + vdiff + vertico + vimish-fold @@ -2511,8 +2908,10 @@ ** Indirectly covered packages #+cindex: Implicitly supported packages These do not require any extra styles because they are configured to -inherit from some basic faces. Please confirm. +inherit from some basic faces or their dependencies which are directly +supported by the themes. ++ counsel-notmuch + edit-indirect + evil-owl + fortran-mode @@ -2524,7 +2923,7 @@ ** Indirectly covered packages + swift-mode + tab-bar-echo-area -* Notes for individual packages +* Notes on individual packages :properties: :custom_id: h:4c4d901a-84d7-4f20-bd99-0808c2b06eba :end: @@ -2532,7 +2931,22 @@ * Notes for individual packages This section covers information that may be of interest to users of individual packages. -** Note for dimmer.el +** Note on inline Latex in Org buffers +:properties: +:custom_id: h:dd8478da-f56a-45cd-b199-b836c85c3c5a +:end: + +Org can work with inline latex and related syntax. To actually fontify +those constructs, set the variable ~org-highlight-latex-and-related~ to +the desired list of values (per its doc string). For example: + +#+begin_src emacs-lisp +(setq org-highlight-latex-and-related '(latex script)) +#+end_src + +Remember to use {{{kbd(M-x org-mode-restart)}}} for changes to take effect. + +** Note on dimmer.el :properties: :custom_id: h:8eb4b758-d318-4480-9ead-357a571beb93 :end: @@ -2568,7 +2982,7 @@ ** Note for dimmer.el inadvertently leads to the opposite of the intended utility of this package: it draws too much attention to unfocused windows. -** Note for display-fill-column-indicator-mode +** Note on display-fill-column-indicator-mode :properties: :custom_id: h:2a602816-bc1b-45bf-9675-4cbbd7bf6cab :end: @@ -2600,7 +3014,7 @@ ** Note for display-fill-column-indicator-mode [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]. -** Note for mmm-mode.el background colors +** Note on mmm-mode.el background colors :properties: :custom_id: h:99cf0d6c-e478-4e26-9932-3bf3427d13f6 :end: @@ -2650,7 +3064,7 @@ ** Note for mmm-mode.el background colors `(mmm-special-submode-face ((,class :background ,green-refine-bg))))) #+end_src -** Note for prism.el +** Note on prism.el :properties: :alt_title: Note for prism :custom_id: h:a94272e0-99da-4149-9e80-11a7e67a2cf2 @@ -2746,6 +3160,42 @@ ** Note for prism.el magenta))) #+end_src +** Note on god-mode.el +:properties: +:alt_title: Note for god-mode +:custom_id: h:4da1d515-3e05-47ef-9e45-8251fc7e986a +:end: + +The ~god-mode~ library does not provide faces that could be configured by +the Modus themes. Users who would like to get some visual feedback on +the status of {{{kbd(M-x god-mode)}}} are instead encouraged by upstream to +set up their own configurations, such as by changing the ~mode-line~ face +([[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization (do-it-yourself)]]). This is an adaptation of the +approach followed in the upstream README: + +#+begin_src emacs-lisp +(defun my-god-mode-update-mode-line () + "Make `mode-line' blue if God local mode is active." + (modus-themes-with-colors + (if god-local-mode + (set-face-attribute 'mode-line nil + :foreground blue-active + :background bg-active-accent + :box blue) + (set-face-attribute 'mode-line nil + :foreground fg-active + :background bg-active + :box fg-alt)))) + +(add-hook 'post-command-hook 'my-god-mode-update-mode-line) +#+end_src + +We employ the ~modus-themes-with-colors~ which provides access to color +variables defined by the active theme. Its use is covered elsewhere in +this manual ([[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]). As for the +attributes that can be passed to each face, start by consulting the +documentation string of ~set-face-attribute~. + ** Note on company-mode overlay pop-up :properties: :custom_id: h:20cef8c4-d11f-4053-8b2c-2872925780b1 @@ -2762,7 +3212,7 @@ ** Note on company-mode overlay pop-up https://github.com/company-mode/company-mode/issues/1010][fn:: https://github.com/tumashu/company-posframe/] -** Note for ERC escaped color sequences +** Note on ERC escaped color sequences :properties: :custom_id: h:98bdf319-1e32-4469-8a01-771200fba65c :end: @@ -2795,14 +3245,14 @@ ** Note for ERC escaped color sequences Colors 0 and 1 are white and black respectively. So combine them together, if you must. -** Note for powerline or spaceline +** Note on powerline or spaceline :properties: :custom_id: h:9130a8ba-d8e3-41be-a58b-3cb1eb7b6d17 :end: Both Powerline and Spaceline package users will likely need to use the command ~powerline-reset~ whenever they make changes to their themes -and/or modeline setup. +and/or mode line setup. ** Note on SHR colors :properties: @@ -2815,8 +3265,7 @@ ** Note on SHR colors Consult {{{kbd(C-h v shr-use-colors)}}}. - -** Note for EWW and Elfeed fonts (SHR fonts) +** Note on EWW and Elfeed fonts (SHR fonts) :properties: :custom_id: h:e6c5451f-6763-4be7-8fdb-b4706a422a4c :end: @@ -2830,7 +3279,7 @@ ** Note for EWW and Elfeed fonts (SHR fonts) [[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]]. -** Note for Helm grep +** Note on Helm grep :properties: :custom_id: h:d28879a2-8e4b-4525-986e-14c0f873d229 :end: @@ -2930,6 +3379,217 @@ ** Note on pdf-tools link hints "-draw" "text %X,%Y '%c'")))) #+end_src +* Frequently Asked Questions (FAQ) +:properties: +:custom_id: h:b3384767-30d3-4484-ba7f-081729f03a47 +:end: +#+cindex: Frequently Asked Questions (FAQ) + +In this section we provide answers related to some aspects of the Modus +themes' design and application. + +** Is the contrast ratio about adjacent colors? +:properties: +:custom_id: h:5ce7ae2e-9348-4e55-b4cf-9302345b1826 +:end: +#+cindex: Contrast between adjacent colors + +The minimum contrast ratio in relative luminance that the themes conform +with always refers to any given combination of background and foreground +colors. If we have some blue colored text next to a magenta one, both +against a white background, we do not mean to imply that blue:magenta is +7:1 in terms of relative luminance. Rather, we state that blue:white +and magenta:white each are 7:1 or higher. + +The point of reference is always the background. Because colors have +about the same minimum distance in luminance from their backdrop, they +necessarily are fairly close to each other in this measure. A possible +blue:magenta combination would naturally be around 1:1 in contrast of +the sort here considered. + +To differentiate between sequential colors, we rely on hueness by +mapping contrasting hues to adjacent constructs, while avoiding +exaggerations. A blue next to a magenta can be told apart regardless of +their respective contrast ratio against their common background. +Exceptions would be tiny characters in arguably not so realistic cases, +such as two dots drawn side-by-side which for some reason would need to +be colored differently. They would still be legible though, which is +the primary objective of the Modus themes. + +** What does it mean to avoid exaggerations? +:properties: +:custom_id: h:44284e1f-fab8-4c4f-92f0-544728a7c91e +:end: +#+cindex: Avoiding exaggerations in design + +The Modus themes are designed with restraint, so that their default +looks do not overdo it with the application of color. + +[[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]. + +This is the non-quantifiable aspect of the themes' design: the artistic +part, if you will. There are a lot of cases where color can be used +inconsiderately, without accounting for layout, typographic, or other +properties of the presentation. For example, two headings with distinct +markers, such as leading asterisks in Org buffers, do not have to have +highly contrasting hues between them in order to be told apart: the +added element of contrast in hueness does not contribute significantly +more to the distinction between the headings than colors whose hues are +relatively closer to each other in the color space. + +Exaggerations can be hard to anticipate or identify. Multiple shades of +blue and magenta in the same context may not seem optimal: one might +think that it would be better to use highly contrasting hues to ensure +that all colors stand out, such as by placing blue next to yellow, next +to magenta, and green. That would, however, be a case of design for its +own sake; a case where color is being applied without consideration of +its end results in the given context. Too many contrasting hues in +close proximity force an erratic rate to how the eye jumps from one +piece of text to the next. Whereas multiple shades of, say, blue and +magenta can suffice to tell things apart and avoid excess coloration: a +harmonious rhythm. + +** Why are colors mostly variants of blue, magenta, cyan? +:properties: +:custom_id: h:0b26cb47-9733-4cb1-87d9-50850cb0386e +:end: +#+cindex: Innate color qualities of the palette + +Due to the innate properties of color, some options are better than +others for the accessibility purposes of the themes, the stylistic +consistency between ~modus-operandi~ and ~modus-vivendi~, and the avoidance +of exaggerations in design. + +[[#h:44284e1f-fab8-4c4f-92f0-544728a7c91e][What does it mean to avoid exaggerations?]] + +What we describe as color is a function of three distinct channels of +light: red, green, blue. In hexadecimal RGB notation, a color value is +read as three pairs of red, green, and blue light: =#RRGGBB=. Of those +three, the most luminant is green, while the least luminant is blue. + +The three basic colors represent each of the channels of light. They +can be intermixed to give us six colors: red and green derive yellow, +green and blue make cyan, red and blue turn into magenta. + +We can test the luminance of each of those against white and black to +get a sense of how not all colors are equally good for accessibility +(white is =#ffffff=, which means that all three light channels are fully +luminated, while black is =#000000= meaning that no light is present +(notwithstanding display technology)). + +#+begin_example +| Name | | #ffffff | #000000 | +|---------+---------+---------+---------| +| red | #ff0000 | 4.00 | 5.25 | +| yellow | #ffff00 | 1.07 | 19.56 | +| green | #00ff00 | 1.37 | 15.30 | +| cyan | #00ffff | 1.25 | 16.75 | +| blue | #0000ff | 8.59 | 2.44 | +| magenta | #ff00ff | 3.14 | 6.70 | +#+end_example + +[[#h:02e25930-e71a-493d-828a-8907fc80f874][Measure color contrast]]. + +By reading this table we learn that every color that has a high level of +green light (green, yellow, cyan) is virtually unreadable against a +white background and, conversely, can be easily read against black. + +We can then infer that red and blue, in different combinations, with +green acting as calibrator for luminance, will give us fairly moderate +colors that pass the 7:1 target. Blue with a bit of green produce +appropriate variants of cyan. Similarly, blue combined with some red +and hints of green give us suitable shades of purple. + +Due to the need of maintaining some difference in hueness between +adjacent colors, it is not possible to make red, green, and yellow the +primary colors, because blue could not be used to control their +luminance and, thus the relevant space would shrink considerably. + +[[#h:5ce7ae2e-9348-4e55-b4cf-9302345b1826][Is the contrast ratio about adjacent colors?]] + +This phenomenon is best illustrated by the following table that measures +the relative luminance of shades of red, yellow, magenta against white: + +#+begin_example +| | #ffffff | +|---------+---------| +| #990000 | 8.92 | +| #995500 | 5.75 | +| #990099 | 7.46 | +#+end_example + +We notice that equal values of red and blue light in =#990099= (magenta +shade) do not lead to a considerable change in luminance compared with +=#990000= (red variant). Whereas less amount of green light in =#995500= +leads to a major drop in luminance relative to white. It follows that +using the green channel of light to calibrate the luminance of colors is +more effective than trying to do the same with either red or blue (the +latter is the least effective in that regard). + +When we need to work with several colors, it is always better to have +sufficient manoeuvring space, especially since we cannot pick arbitrary +colors but only those that satisfy the accessibility objectives of the +themes. + +As for why we do not mostly use green, yellow, cyan for the dark theme, +it is because those colors are far more luminant than their counterparts +on the other side of the spectrum, so to ensure that they all have about +the same contrast ratios we would have to alter their hueness +considerably. In short, the effect would not be optimal as it would +lead to exaggerations. Plus, it would make ~modus-vivendi~ look +completely different than ~modus-operandi~, to the effect that the two +could not be properly considered part of the same project. + +** What is the best setup for legibility? +:properties: +:custom_id: h:f60cc2ae-129d-47c0-9849-4f6bbd87d8be +:end: +#+cindex: General setup for readability + +The Modus themes can be conceptually simplified as combinations of color +values that account for relative luminance and inner harmony. Those +qualities do not guarantee that every end-user will have the same +experience, due to differences between people, but also because of +variances in hardware capabilities and configurations. For the purposes +of this document, we may only provide suggestions pertaining to the +latter case. + +~modus-operandi~ is best used outdoors or in a room that either gets +direct sunlight or has plenty of light. Whereas ~modus-vivendi~ works +better when there is not a lot of sunshine or the room has a source of +light, preferably a faint or warm one. It is possible to use +~modus-operandi~ at night and ~modus-vivendi~ during the day, though that +will depend on several variables, such as one's overall perception of +color, the paint on the walls and how that contributes to the impression +of lightness in the room, the sense of space within the eye's peripheral +vision, hardware specifications, and environmental factors. + +In general, an additional source of light other than that of the monitor +can help reduce eye strain: the eyes are more relaxed when they do not +have to focus on one point to gather light. + +The monitor's display settings must be accounted for. Gamma ray values, +in particular, need to be calibrated to neither amplify nor distort the +perception of black. Same principle for sharpness, brightness, and +contrast as determined by the hardware, which all have an effect on how +text is read on the screen. + +There are software level methods on offer, such as the XrandR utility +for the X Window System (X.org), which can make gamma corrections for +each of the three channels of light (red, green, blue). For example: + +: xrandr --output LVDS1 --brightness 1.0 --gamma 0.76:0.75:0.68 + +Typography is another variable. Some font families are blurry at small +point sizes. Others may have a regular weight that is lighter (thiner) +than that of their peers which may, under certain circumstances, cause a +halo effect around each glyph. + +The gist is that legibility cannot be fully solved at the theme level. +The color combinations may have been optimized for accessibility, though +the remaining contributing factors in each case need to be considered in +full. + * Contributing :properties: :custom_id: h:9c3cd842-14b7-44d7-84b2-a5c8bc3fc3b1 @@ -3056,10 +3716,10 @@ * Acknowledgements + Author/maintainer :: Protesilaos Stavrou. + Contributions to code or documentation :: Anders Johansson, Basil - L.{{{space()}}} Contovounesios, Carlo Zancanaro, Eli Zaretskii, Kostadin - Ninev, Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro - Aranda, Nicolas De Jaeghere, Shreyas Ragavan, Stefan Kangas, Vincent - Murphy, Xinglu Chen. + L.{{{space()}}} Contovounesios, Carlo Zancanaro, Eli Zaretskii, Fritz Grabo, + Kostadin Ninev, Madhavan Krishnan, Markus Beppler, Matthew Stevenson, + Mauro Aranda, Nicolas De Jaeghere, Rudolf Adamkovič, Shreyas Ragavan, + Stefan Kangas, Vincent Murphy, Xinglu Chen. + Ideas and user feedback :: Aaron Jensen, Adam Spiers, Adrian Manea, Alex Griffin, Alex Peitsinis, Alexey Shmalko, Alok Singh, Anders @@ -3073,12 +3733,13 @@ * Acknowledgements Ninev, Len Trigg, Manuel Uberti, Mark Burton, Markus Beppler, Mauro Aranda, Michael Goldenberg, Morgan Smith, Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere, Paul Poloskov, Pete Kazmier, Peter Wu, - Philip K., Pierre Téchoueyres, Roman Rudakov, Ryan Phillips, Sam - Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, - Trey Merkley, Togan Muftuoglu, Toon Claes, Uri Sharf, Utkarsh Singh, - Vincent Foley. As well as users: Ben, CsBigDataHub1, Emacs Contrib, - Eugene, Fourchaux, Fredrik, Moesasji, Nick, TheBlob42, Trey, - bepolymathe, doolio, fleimgruber, iSeeU, jixiuf, okamsn, pRot0ta1p. + Philip K., Pierre Téchoueyres, Roman Rudakov, Ryan Phillips, Rudolf + Adamkovič, Sam Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo Horn, + Thibaut Verron, Trey Merkley, Togan Muftuoglu, Toon Claes, Uri Sharf, + Utkarsh Singh, Vincent Foley. As well as users: Ben, CsBigDataHub1, + Emacs Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, TheBlob42, + Trey, bepolymathe, doolio, fleimgruber, iSeeU, jixiuf, okamsn, + pRot0ta1p. + Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs), diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el index 77c2e1198c..cd73681599 100644 --- a/etc/themes/modus-operandi-theme.el +++ b/etc/themes/modus-operandi-theme.el @@ -4,7 +4,7 @@ ;;; modus-operandi-theme.el --- Accessible light theme (WCAG AAA) -*- lexical-bi ;; Author: Protesilaos Stavrou ;; URL: https://gitlab.com/protesilaos/modus-themes -;; Version: 1.3.2 +;; Version: 1.4.0 ;; Package-Requires: ((emacs "26.1")) ;; Keywords: faces, theme, accessibility diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el index 08e634e10d..c70c560b9e 100644 --- a/etc/themes/modus-themes.el +++ b/etc/themes/modus-themes.el @@ -4,8 +4,8 @@ ;;; modus-themes.el --- Highly accessible themes (WCAG AAA) -*- lexical-binding: ;; Author: Protesilaos Stavrou ;; URL: https://gitlab.com/protesilaos/modus-themes -;; Version: 1.3.2 -;; Last-Modified: <2021-04-18 06:25:05 +0300> +;; Version: 1.4.0 +;; Last-Modified: <2021-05-25 12:25:39 +0300> ;; Package-Requires: ((emacs "26.1")) ;; Keywords: faces, theme, accessibility @@ -28,21 +28,23 @@ ;;; Commentary: ;; ;; The Modus themes conform with the highest standard for color-contrast ;; accessibility between background and foreground values (WCAG AAA). -;; This file contains all customization options, helper functions, +;; This file contains all customization variables, helper functions, ;; interactive commands, and face specifications. Please refer to the ;; official Info manual for further documentation (distributed with the ;; themes, or available at: ). ;; -;; The themes share the following customization options, all of which +;; The themes share the following customization variables, all of which ;; are disabled by default (nil): ;; ;; modus-themes-slanted-constructs (boolean) ;; modus-themes-bold-constructs (boolean) ;; modus-themes-variable-pitch-headings (boolean) ;; modus-themes-variable-pitch-ui (boolean) +;; modus-themes-scale-headings (boolean) +;; modus-themes-subtle-line-numbers (boolean) +;; modus-themes-success-deuteranopia (boolean) ;; modus-themes-no-mixed-fonts (boolean) ;; modus-themes-headings (alist) -;; modus-themes-scale-headings (boolean) ;; modus-themes-fringes (choice) ;; modus-themes-lang-checkers (choice) ;; modus-themes-org-blocks (choice) @@ -52,11 +54,11 @@ ;;; Commentary: ;; modus-themes-diffs (choice) ;; modus-themes-syntax (choice) ;; modus-themes-hl-line (choice) -;; modus-themes-subtle-line-numbers (boolean) ;; modus-themes-paren-match (choice) ;; modus-themes-region (choice) ;; modus-themes-links (choice) ;; modus-themes-completions (choice) +;; modus-themes-mail-citations (choice) ;; ;; The default scale for headings is as follows (it can be customized as ;; well---remember, no scaling takes place by default): @@ -67,7 +69,7 @@ ;;; Commentary: ;; modus-themes-scale-4 1.2 ;; modus-themes-scale-5 1.3 ;; -;; There also exist two unique customization options for overriding +;; There also exist two unique customization variables for overriding ;; color palette values. The specifics are documented in the manual. ;; The symbols are: ;; @@ -97,6 +99,7 @@ ;;; Commentary: ;; bm ;; bongo ;; boon +;; bookmark ;; breakpoint (provided by built-in gdb-mi.el) ;; buffer-expose ;; calendar and diary @@ -116,7 +119,6 @@ ;;; Commentary: ;; corfu ;; counsel ;; counsel-css -;; counsel-notmuch ;; counsel-org-capture-string ;; cov ;; cperl-mode @@ -259,7 +261,7 @@ ;;; Commentary: ;; minibuffer-line ;; minimap ;; mmm-mode -;; modeline +;; mode-line ;; mood-line ;; mpdel ;; mu4e @@ -360,7 +362,7 @@ ;;; Commentary: ;; tuareg ;; typescript ;; undo-tree -;; vc (built-in mode line status for version control) +;; vc (vc-dir.el, vc-hooks.el) ;; vc-annotate (C-x v g) ;; vdiff ;; vertico @@ -414,7 +416,15 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) (defgroup modus-themes () - "Options for `modus-operandi', `modus-vivendi'." + "Options for `modus-operandi', `modus-vivendi'. +The Modus themes conform with the WCAG AAA standard for color +contrast between background and foreground combinations (a +minimum contrast of 7:1---the highest standard of its kind). The +themes also strive to empower users with red-green color +deficiency: this is achieved through customization variables that +replace all relevant instances of green with blue, as well as the +overall design of the themes which relies mostly on colors that +cover the blue-cyan-magenta side of the spectrum." :group 'faces :link '(info-link "(modus-themes) Top") :prefix "modus-themes-" @@ -424,16 +434,6 @@ ;;; Variables for each theme variant ;;;; Modus Operandi -(define-obsolete-variable-alias - 'modus-operandi-theme-default-colors-alist - 'modus-themes-colors-operandi - "1.0.0") - -(define-obsolete-variable-alias - 'modus-themes-colors-operandi - 'modus-themes-operandi-colors - "1.1.0") - (defconst modus-themes-operandi-colors '(;; base values (bg-main . "#ffffff") (fg-main . "#000000") @@ -587,10 +587,6 @@ (defconst modus-themes-operandi-colors ;; bg-tab-bar is only intended for the bar that holds the tabs and ;; can only be combined with fg-main ;; - ;; fg-tab-accent is meant to be combined with bg-tab-active, - ;; though only for styling special elements, such as underlining - ;; the current tab - ;; ;; fg-escape-char-construct and fg-escape-char-backslash can ;; be combined bg-main, bg-dim, bg-alt ;; @@ -610,10 +606,12 @@ (defconst modus-themes-operandi-colors ;; all pairs are combinable with themselves (bg-hl-line . "#f2eff3") (bg-hl-line-intense . "#e0e0e0") + (bg-hl-line-intense-accent . "#b9e1ef") (bg-hl-alt . "#fbeee0") (bg-hl-alt-intense . "#e8dfd1") (bg-paren-match . "#e0af82") (bg-paren-match-intense . "#c488ff") + (bg-paren-expression . "#dff0ff") (bg-region . "#bcbcbc") (bg-region-accent . "#afafef") @@ -621,7 +619,6 @@ (defconst modus-themes-operandi-colors (bg-tab-active . "#f6f6f6") (bg-tab-inactive . "#bdbdbd") (bg-tab-inactive-alt . "#999999") - (fg-tab-accent . "#30169e") (red-tab . "#680000") (green-tab . "#003900") @@ -648,7 +645,7 @@ (defconst modus-themes-operandi-colors (fg-unfocused . "#56576d") (fg-docstring . "#2a486a") - (fg-comment-yellow . "#5f4400") + (fg-comment-yellow . "#794319") (bg-header . "#e5e5e5") (fg-header . "#2a2a2a") @@ -673,22 +670,12 @@ (defconst modus-themes-operandi-colors (bg-mark-sel . "#a0f0cf") (fg-mark-sel . "#005040") (bg-mark-del . "#ffccbb") (fg-mark-del . "#840040") (bg-mark-alt . "#f5d88f") (fg-mark-alt . "#782900")) - "The entire palette of `modus-operandi' theme. + "The entire palette of the `modus-operandi' theme. Each element has the form (NAME . HEX) with the former as a symbol and the latter as a string.") ;;;; Modus Vivendi -(define-obsolete-variable-alias - 'modus-vivendi-theme-default-colors-alist - 'modus-themes-colors-vivendi - "1.0.0") - -(define-obsolete-variable-alias - 'modus-themes-colors-vivendi - 'modus-themes-vivendi-colors - "1.1.0") - (defconst modus-themes-vivendi-colors '(;; base values (bg-main . "#000000") (fg-main . "#ffffff") @@ -712,29 +699,29 @@ (defconst modus-themes-vivendi-colors (bg-special-calm . "#392a48") (fg-special-calm . "#fbd6f4") ;; foregrounds that can be combined with bg-main, bg-dim, bg-alt (red . "#ff8059") - (red-alt . "#f4923b") - (red-alt-other . "#ff9977") + (red-alt . "#ef8b50") + (red-alt-other . "#ff9077") (red-faint . "#ffa0a0") (red-alt-faint . "#f5aa80") (red-alt-other-faint . "#ff9fbf") (green . "#44bc44") - (green-alt . "#70c900") - (green-alt-other . "#00cd68") - (green-faint . "#88cf88") - (green-alt-faint . "#a8cf88") - (green-alt-other-faint . "#88cfaf") - (yellow . "#eecc00") - (yellow-alt . "#cfdf30") - (yellow-alt-other . "#f0ce43") + (green-alt . "#70b900") + (green-alt-other . "#00c06f") + (green-faint . "#78bf78") + (green-alt-faint . "#99b56f") + (green-alt-other-faint . "#88bf99") + (yellow . "#e0cc00") + (yellow-alt . "#c4d030") + (yellow-alt-other . "#e3c55f") (yellow-faint . "#d2b580") (yellow-alt-faint . "#cabf77") (yellow-alt-other-faint . "#d0ba95") (blue . "#2fafff") (blue-alt . "#79a8ff" ) (blue-alt-other . "#00bcff") - (blue-faint . "#92baff") - (blue-alt-faint . "#a0acf5") - (blue-alt-other-faint . "#87c8ff") + (blue-faint . "#82b0ec") + (blue-alt-faint . "#a0acef") + (blue-alt-other-faint . "#80b2f0") (magenta . "#feacd0") (magenta-alt . "#f78fe7") (magenta-alt-other . "#b6a0ff") @@ -742,7 +729,7 @@ (defconst modus-themes-vivendi-colors (magenta-alt-faint . "#ef9fe4") (magenta-alt-other-faint . "#cfa6ff") (cyan . "#00d3d0") - (cyan-alt . "#4ae8fc") + (cyan-alt . "#4ae2f0") (cyan-alt-other . "#6ae4b9") (cyan-faint . "#90c4ed") (cyan-alt-faint . "#a0bfdf") @@ -842,10 +829,6 @@ (defconst modus-themes-vivendi-colors ;; bg-tab-bar is only intended for the bar that holds the tabs and ;; can only be combined with fg-main ;; - ;; fg-tab-accent is meant to be combined with bg-tab-active, - ;; though only for styling special elements, such as underlining - ;; the current tab - ;; ;; fg-escape-char-construct and fg-escape-char-backslash can ;; be combined bg-main, bg-dim, bg-alt ;; @@ -865,10 +848,12 @@ (defconst modus-themes-vivendi-colors ;; all pairs are combinable with themselves (bg-hl-line . "#151823") (bg-hl-line-intense . "#2f2f2f") + (bg-hl-line-intense-accent . "#00353f") (bg-hl-alt . "#181732") (bg-hl-alt-intense . "#282e46") (bg-paren-match . "#5f362f") (bg-paren-match-intense . "#7416b5") + (bg-paren-expression . "#221044") (bg-region . "#3c3c3c") (bg-region-accent . "#4f3d88") @@ -876,7 +861,6 @@ (defconst modus-themes-vivendi-colors (bg-tab-active . "#0e0e0e") (bg-tab-inactive . "#3d3d3d") (bg-tab-inactive-alt . "#595959") - (fg-tab-accent . "#5ac3cf") (red-tab . "#ffc0bf") (green-tab . "#88ef88") @@ -903,7 +887,7 @@ (defconst modus-themes-vivendi-colors (fg-unfocused . "#93959b") (fg-docstring . "#b0d6f5") - (fg-comment-yellow . "#cab98f") + (fg-comment-yellow . "#d0a070") (bg-header . "#212121") (fg-header . "#dddddd") @@ -928,7 +912,7 @@ (defconst modus-themes-vivendi-colors (bg-mark-sel . "#002f2f") (fg-mark-sel . "#60cfa2") (bg-mark-del . "#5a0000") (fg-mark-del . "#ff99aa") (bg-mark-alt . "#3f2210") (fg-mark-alt . "#f0aa20")) - "The entire palette of `modus-vivendi' theme. + "The entire palette of the `modus-vivendi' theme. Each element has the form (NAME . HEX) with the former as a symbol and the latter as a string.") @@ -1080,38 +1064,38 @@ (defface modus-themes-refine-cyan nil The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-active-red nil - "A red background meant for use on the modeline or similar. -This is combined with the modelines primary foreground value. + "A red background meant for use on the mode line or similar. +This is combined with the mode lines primary foreground value. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-active-green nil - "A green background meant for use on the modeline or similar. -This is combined with the modelines primary foreground value. + "A green background meant for use on the mode line or similar. +This is combined with the mode lines primary foreground value. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-active-yellow nil - "A yellow background meant for use on the modeline or similar. -This is combined with the modelines primary foreground value. + "A yellow background meant for use on the mode line or similar. +This is combined with the mode lines primary foreground value. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-active-blue nil - "A blue background meant for use on the modeline or similar. -This is combined with the modelines primary foreground value. + "A blue background meant for use on the mode line or similar. +This is combined with the mode lines primary foreground value. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-active-magenta nil - "A magenta background meant for use on the modeline or similar. -This is combined with the modelines primary foreground value. + "A magenta background meant for use on the mode line or similar. +This is combined with the mode lines primary foreground value. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-active-cyan nil - "A cyan background meant for use on the modeline or similar. -This is combined with the modelines primary foreground value. + "A cyan background meant for use on the mode line or similar. +This is combined with the mode lines primary foreground value. The actual styling of the face is done by `modus-themes-faces'.") @@ -1153,81 +1137,87 @@ (defface modus-themes-fringe-cyan nil (defface modus-themes-nuanced-red nil "A nuanced red background. -This does not specify a foreground of its own. Instead it is meant to -serve as the backdrop for elements such as Org blocks, headings, and any -other surface that needs to retain the colors on display. +This does not specify a foreground of its own. Instead it is +meant to serve as the backdrop for elements such as Org blocks, +headings, and any other surface that needs to retain the colors +on display. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-nuanced-green nil "A nuanced green background. -This does not specify a foreground of its own. Instead it is meant to -serve as the backdrop for elements such as Org blocks, headings, and any -other surface that needs to retain the colors on display. +This does not specify a foreground of its own. Instead it is +meant to serve as the backdrop for elements such as Org blocks, +headings, and any other surface that needs to retain the colors +on display. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-nuanced-yellow nil "A nuanced yellow background. -This does not specify a foreground of its own. Instead it is meant to -serve as the backdrop for elements such as Org blocks, headings, and any -other surface that needs to retain the colors on display. +This does not specify a foreground of its own. Instead it is +meant to serve as the backdrop for elements such as Org blocks, +headings, and any other surface that needs to retain the colors +on display. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-nuanced-blue nil "A nuanced blue background. -This does not specify a foreground of its own. Instead it is meant to -serve as the backdrop for elements such as Org blocks, headings, and any -other surface that needs to retain the colors on display. +This does not specify a foreground of its own. Instead it is +meant to serve as the backdrop for elements such as Org blocks, +headings, and any other surface that needs to retain the colors +on display. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-nuanced-magenta nil "A nuanced magenta background. -This does not specify a foreground of its own. Instead it is meant to -serve as the backdrop for elements such as Org blocks, headings, and any -other surface that needs to retain the colors on display. +This does not specify a foreground of its own. Instead it is +meant to serve as the backdrop for elements such as Org blocks, +headings, and any other surface that needs to retain the colors +on display. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-nuanced-cyan nil "A nuanced cyan background. -This does not specify a foreground of its own. Instead it is meant to -serve as the backdrop for elements such as Org blocks, headings, and any -other surface that needs to retain the colors on display. +This does not specify a foreground of its own. Instead it is +meant to serve as the backdrop for elements such as Org blocks, +headings, and any other surface that needs to retain the colors +on display. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-special-cold nil "Combines the 'special cold' background and foreground values. This is intended for cases when a neutral gray background is not -suitable and where a combination of more saturated colors would not be -appropriate. +suitable and where a combination of more saturated colors would +not be appropriate. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-special-mild nil "Combines the 'special mild' background and foreground values. This is intended for cases when a neutral gray background is not -suitable and where a combination of more saturated colors would not be -appropriate. +suitable and where a combination of more saturated colors would +not be appropriate. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-special-warm nil "Combines the 'special warm' background and foreground values. This is intended for cases when a neutral gray background is not -suitable and where a combination of more saturated colors would not be -appropriate. +suitable and where a combination of more saturated colors would +not be appropriate. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-special-calm nil "Combines the 'special calm' background and foreground values. This is intended for cases when a neutral gray background is not -suitable and where a combination of more saturated colors would not be -appropriate. +suitable and where a combination of more saturated colors would +not be appropriate. The actual styling of the face is done by `modus-themes-faces'.") @@ -1331,64 +1321,64 @@ (defface modus-themes-mark-symbol nil (defface modus-themes-heading-1 nil "General purpose face for use in headings level 1. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-2 nil "General purpose face for use in headings level 2. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-3 nil "General purpose face for use in headings level 3. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-4 nil "General purpose face for use in headings level 4. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-5 nil "General purpose face for use in headings level 5. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-6 nil "General purpose face for use in headings level 6. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-7 nil "General purpose face for use in headings level 7. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-heading-8 nil "General purpose face for use in headings level 8. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-headings' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-headings' variable. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-hl-line nil "General purpose face for the current line. -The exact attributes assigned to this face are contingent on the values -assigned to the `modus-themes-hl-line' variable. +The exact attributes assigned to this face are contingent on the +values assigned to the `modus-themes-hl-line' variable. The actual styling of the face is done by `modus-themes-faces'.") @@ -1414,97 +1404,97 @@ (defface modus-themes-variable-pitch nil (defface modus-themes-graph-red-0 nil "Special subdued red face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-red-1 nil "Special prominent red face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-green-0 nil "Special subdued green face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-green-1 nil "Special prominent green face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-yellow-0 nil "Special subdued yellow face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-yellow-1 nil "Special prominent yellow face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-blue-0 nil "Special subdued blue face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-blue-1 nil "Special prominent blue face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-magenta-0 nil "Special subdued magenta face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-magenta-1 nil "Special prominent magenta face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-cyan-0 nil "Special subdued cyan face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") (defface modus-themes-graph-cyan-1 nil "Special prominent cyan face for use in graphs. -This is intended to be applied in contexts such as the Org agenda habit -graph where faithfulness to the semantics of a color value is of -paramount importance. +This is intended to be applied in contexts such as the Org agenda +habit graph where faithfulness to the semantics of a color value +is of paramount importance. The actual styling of the face is done by `modus-themes-faces'.") @@ -1553,11 +1543,21 @@ (defface modus-themes-key-binding nil "Generic face for key bindings. The actual styling of the face is done by `modus-themes-faces'.") - +(defface modus-themes-search-success nil + "Generic face for successful search. +The actual styling of the face is done by `modus-themes-faces'.") -;;; Customization options +(defface modus-themes-search-success-modeline nil + "Generic mode line indicator for successful search. +The actual styling of the face is done by `modus-themes-faces'.") -;;;; Current customization options (>= 1.0.0) +(defface modus-themes-search-success-lazy nil + "Generic face for successful, lazily highlighted search. +The actual styling of the face is done by `modus-themes-faces'.") + + + +;;; Customization variables (defcustom modus-themes-operandi-color-overrides nil "Override colors in the Modus Operandi palette. @@ -1934,28 +1934,43 @@ (defcustom modus-themes-lang-checkers nil (defcustom modus-themes-org-blocks nil "Use a subtle gray or color-coded background for Org blocks. -Nil means that the block will have no background of its own and -will use the default that applies to the rest of the buffer. - -Option `grayscale' (or `greyscale') will apply a subtle neutral -gray background to the block's contents. It also affects the -begin and end lines of the block: their background will be -extended to the edge of the window for Emacs version >= 27 where -the ':extend' keyword is recognized by `set-face-attribute'. +Nil (the default) means that the block has no distinct background +of its own and uses the one that applies to the rest of the +buffer. + +Option `gray-background' applies a subtle gray background to the +block's contents. It also affects the begin and end lines of the +block: their background extends to the edge of the window for +Emacs version >= 27 where the ':extend' keyword is recognized by +`set-face-attribute' (this is contingent on the variable +`org-fontify-whole-block-delimiter-line'). + +Option `tinted-background' uses a slightly colored background for +the contents of the block. The exact color will depend on the +programming language and is controlled by the variable +`org-src-block-faces' (refer to the theme's source code for the +current association list). For this to take effect, the Org +buffer needs to be restarted with `org-mode-restart'. + +Code blocks use their major mode's colors only when the variable +`org-src-fontify-natively' is non-nil. While quote/verse blocks +require setting `org-fontify-quote-and-verse-blocks' to a non-nil +value. -Option `rainbow' will use an accented background for the contents -of the block. The exact color will depend on the programming -language and is controlled by the `org-src-block-faces' -variable (refer to the theme's source code for the current -association list)." +Older versions of the themes provided options `grayscale' (or +`greyscale') and `rainbow'. Those will continue to work as they +are aliases for `gray-background' and `tinted-background', +respectively." :group 'modus-themes - :package-version '(modus-themes . "1.0.0") + :package-version '(modus-themes . "1.4.0") :version "28.1" :type '(choice (const :format "[%v] %t\n" :tag "No Org block background (default)" nil) - (const :format "[%v] %t\n" :tag "Subtle gray block background" grayscale) - (const :format "[%v] %t\n" :tag "Subtle gray block background (alt spelling)" greyscale) - (const :format "[%v] %t\n" :tag "Color-coded background per programming language" rainbow)) + (const :format "[%v] %t\n" :tag "Subtle gray block background" gray-background) + (const :format "[%v] %t\n" :tag "Alias for `gray-background'" grayscale) ; for backward compatibility + (const :format "[%v] %t\n" :tag "Alias for `gray-background'" greyscale) + (const :format "[%v] %t\n" :tag "Color-coded background per programming language" tinted-background) + (const :format "[%v] %t\n" :tag "Alias for `tinted-background'" rainbow)) ; back compat :link '(info-link "(modus-themes) Org mode blocks")) (defcustom modus-themes-org-habit nil @@ -2000,19 +2015,19 @@ (defcustom modus-themes-mode-line nil "Adjust the overall style of the mode line. The default (nil) is a two-dimensional rectangle with a border -around it. The active and the inactive modelines use different +around it. The active and the inactive mode lines use different shades of grayscale values for the background and foreground. A `3d' value will apply a three-dimensional effect to the active -modeline. The inactive modelines remain two-dimensional and are -toned down a bit, relative to the nil value. +mode line. The inactive mode lines remain two-dimensional and +are toned down a bit, relative to the nil value. -The `moody' option is meant to optimize the modeline for use with -the library of the same name. This practically means to remove -the box effect and rely on underline and overline properties -instead. It also tones down the inactive modelines. Despite its -intended purpose, this option can also be used without the -`moody' library. +The `moody' option is meant to optimize the mode line for use +with the library of the same name. This practically means to +remove the box effect and rely on underline and overline +properties instead. It also tones down the inactive mode lines. +Despite its intended purpose, this option can also be used +without the `moody' library. The `borderless' option uses the same colors as the default (nil value), but removes the border effect. This is done by making @@ -2021,7 +2036,7 @@ (defcustom modus-themes-mode-line nil The `borderless-3d' and `borderless-moody' approximate the `3d' and `moody' options respectively, while removing the borders. -However, to ensure that the inactive modelines remain visible, +However, to ensure that the inactive mode lines remain visible, they apply a slightly more prominent background to them than what their counterparts do (same inactive background as with the default). @@ -2029,84 +2044,110 @@ (defcustom modus-themes-mode-line nil Similarly, `accented', `accented-3d', and `accented-moody' correspond to the default (nil), `3d', and `moody' styles respectively, except that the active mode line uses a colored -background instead of the standard shade of gray." +background instead of the standard shade of gray. + +Same principle for styles `borderless-accented', +`borderless-accented-3d', `borderless-accented-moody', which +apply a colored background to the active mode line, while they +remove any noticeable border around both the active and inactive +the mode lines." :group 'modus-themes - :package-version '(modus-themes . "1.3.0") + :package-version '(modus-themes . "1.4.0") :version "28.1" :type '(choice (const :format "[%v] %t\n" :tag "Two-dimensional box (default)" nil) (const :format "[%v] %t\n" :tag "Three-dimensional style for the active mode line" 3d) (const :format "[%v] %t\n" :tag "No box effects, which are optimal for use with the `moody' library" moody) - (const :format "[%v] %t\n" :tag "Like the default, but without border effects" borderless) + (const :format "[%v] %t\n" :tag "Like the default, but without discernible border effects" borderless) (const :format "[%v] %t\n" :tag "Like `3d', but without noticeable border" borderless-3d) (const :format "[%v] %t\n" :tag "Like `moody', but without noticeable border" borderless-moody) (const :format "[%v] %t\n" :tag "Two-dimensional box with a colored background" accented) (const :format "[%v] %t\n" :tag "Like `3d', but with a colored background" accented-3d) - (const :format "[%v] %t\n" :tag "Like `moody', but with a colored background" accented-moody)) + (const :format "[%v] %t\n" :tag "Like `moody', but with a colored background" accented-moody) + (const :format "[%v] %t\n" :tag "Like `accented', but without a noticeable border" borderless-accented) + (const :format "[%v] %t\n" :tag "Like `accented-3d', but with a noticeable border" borderless-accented-3d) + (const :format "[%v] %t\n" :tag "Like `accented-moody', but with a noticeable border" borderless-accented-moody)) :link '(info-link "(modus-themes) Mode line")) (defcustom modus-themes-diffs nil - "Adjust the overall styles of diffs. - -Nil means to use fairly intense color combinations for diffs. -For example, you get a rich green background with a green -foreground for added lines. Word-wise or 'refined' diffs follow -the same pattern but use different shades of those colors to -remain distinct. + "Adjust the overall style of diffs. -A `desaturated' value follows the same principles as with the nil -option, while it tones down all relevant colors. +The default (nil) uses fairly intense color combinations for +diffs, by applying prominently colored backgrounds, with +appropriate foregrounds. -Option `fg-only' will remove all accented backgrounds, except -from word-wise changes. It instead uses color-coded foreground -values to differentiate between added/removed/changed lines. If -a background is necessary, such as with `ediff', then a subtle -grayscale value is used. +Option `desaturated' follows the same principles as with the +default (nil), though it tones down all relevant colors. Option `bg-only' applies a background but does not override the text's foreground. This makes it suitable for a non-nil value passed to `diff-font-lock-syntax' (note: Magit does not support -syntax highlighting in diffs as of 2020-11-25, version -20201116.1057). - -Option `deuteranopia' accounts for red-green color defficiency by -replacing all instances of green with colors on the blue side of -the spectrum. Other stylistic changes are made in the interest -of optimizing for such a use-case." +syntax highlighting in diffs---last checked on 2021-04-21). + +Option `deuteranopia' is like the default (nil) in terms of using +prominently colored backgrounds, except that it also accounts for +red-green color defficiency by replacing all instances of green +with colors on the blue side of the spectrum. Other stylistic +changes are made in the interest of optimizing for such a +use-case. + +Option `fg-only-deuteranopia' removes all colored backgrounds, +except from word-wise or refined changes. Instead, it only uses +color-coded foreground values to differentiate between added, +removed, and changed lines. If a background is necessary to +denote context, a subtle grayscale value is applied. The color +used for added lines is a variant of blue to account for +red-green color defficiency but also because green text alone is +hard to discern in the diff's context (hard for our accessibility +purposes). The `fg-only' option that existed in older versions +of the themes is now an alias of `fg-only-deuteranopia', in the +interest of backward compatibility." :group 'modus-themes - :package-version '(modus-themes . "1.2.0") + :package-version '(modus-themes . "1.4.0") :version "28.1" :type '(choice (const :format "[%v] %t\n" :tag "Intensely colored backgrounds (default)" nil) (const :format "[%v] %t\n" :tag "Slightly accented backgrounds with tinted text" desaturated) - (const :format "[%v] %t\n" :tag "No backgrounds, except for refined diffs" fg-only) (const :format "[%v] %t\n" :tag "Apply color-coded backgrounds; keep syntax colors in tact" bg-only) - (const :format "[%v] %t\n" :tag "Optimized for red-green color defficiency" deuteranopia)) + (const :format "[%v] %t\n" :tag "Like the default (nil), though optimized for red-green color defficiency" deuteranopia) + (const :format "[%v] %t\n" :tag "No backgrounds, except for refined diffs" fg-only-deuteranopia) + (const :format "[%v] %t\n" :tag "Alias of `fg-only-deuteranopia' for backward compatibility" fg-only)) :link '(info-link "(modus-themes) Diffs")) (defcustom modus-themes-completions nil - "Apply special styles to the UI of completion frameworks. - -This concerns Icomplete, Ivy, Helm, Selectrum, Ido, as well as -any other tool meant to enhance their experience. The effect -will vary depending on the completion framework. - -Nil means to remain faithful to the metaphors that each UI -establishes. For example, Icomplete and Ido only use foreground -colors to style their matches, whereas Ivy or Helm rely on an -aesthetic that combines colored backgrounds with appropriate text -color. - -Option `moderate' will apply a combination of background and -foreground that is fairly subtle. For Icomplete and the like, -this constitutes a departure from their standard style. While -Ivy, Helm, and the others, will use less pronounced colors for -applicable contexts. - -Option `opinionated' will apply color combinations that refashion -the completion UI. So Icomplete et al will now use styles that -resemble the defaults of Ivy and co., while the latter group will -revert to an even more nuanced aesthetic." + "Control the style of the completion framework's interface. + +This is a special option that has different effects depending on +the completion UI. The interfaces can be grouped in two +categories, based on their default aesthetics: (i) those that +only or mostly use foreground colors for their interaction model, +and (ii) those that combine background and foreground values for +some of their metaphors. The former category encompasses +Icomplete, Ido, Selectrum, Vertico, as well as pattern matching +styles like Orderless and Flx. The latter covers Helm, Ivy, and +Sallet. + +A value of nil (the default) will simply respect the metaphors of +each completion framework. + +Option `moderate' applies a combination of background and +foreground that is fairly subtle. For Icomplete and friends this +constitutes a departure from their default aesthetics, however +the difference is small. While Helm, Ivy et al appear slightly +different than their original looks, as they are toned down a +bit. + +Option `opinionated' uses color combinations that refashion the +completion UI. For the Icomplete camp this means that intense +background and foreground combinations are used: in effect their +looks emulate those of Helm, Ivy and company in their original +style. Whereas the other group of packages will revert to an +even more nuanced aesthetic with some additional changes to the +choice of hues. + +To appreciate the scope of this customization option, you should +spend some time with every one of the nil (default), `moderate', +and `opinionated' possibilities." :group 'modus-themes :package-version '(modus-themes . "1.0.0") :version "28.1" @@ -2164,7 +2205,8 @@ (defcustom modus-themes-hl-line nil Option `intense-background' uses a prominent neutral background. -Option `accented-background' uses a subtle colored background. +Option `accented-background' is like the `intense-background' but +with a more colorful background. Option `underline-neutral' combines a subtle neutral background with a gray underline. @@ -2181,7 +2223,7 @@ (defcustom modus-themes-hl-line nil Set `x-underline-at-descent-line' to a non-nil value for better results with underlines." :group 'modus-themes - :package-version '(modus-themes . "1.3.0") + :package-version '(modus-themes . "1.4.0") :version "28.1" :type '(choice (const :format "[%v] %t\n" :tag "Subtle neutral background (default)" nil) @@ -2340,83 +2382,45 @@ (defcustom modus-themes-region nil (const :format "[%v] %t\n" :tag "As with the `accent' option, but does not extend" accent-no-extend)) :link '(info-link "(modus-themes) Active region")) - +(defcustom modus-themes-success-deuteranopia nil + "Color-code 'success' or 'done' as blue instead of green. -;;;; Deprecated customization options (prior to 1.0.0) - -;;;;; Modus Operandi obsolete options - -(make-obsolete 'modus-operandi-theme-override-colors-alist nil "1.0.0") -(make-obsolete 'modus-operandi-theme-slanted-constructs 'modus-themes-slanted-constructs "1.0.0") -(make-obsolete 'modus-operandi-theme-bold-constructs 'modus-themes-bold-constructs "1.0.0") -(make-obsolete 'modus-operandi-theme-proportional-fonts 'modus-themes-variable-pitch-headings "1.0.0") -(make-obsolete 'modus-operandi-theme-variable-pitch-headings 'modus-themes-variable-pitch-headings "1.0.0") -(make-obsolete 'modus-operandi-theme-no-mixed-fonts 'modus-themes-no-mixed-fonts "1.0.0") -(make-obsolete 'modus-operandi-theme-rainbow-headings 'modus-themes-headings "1.0.0") -(make-obsolete 'modus-operandi-theme-section-headings 'modus-themes-headings "1.0.0") -(make-obsolete 'modus-operandi-theme-headings 'modus-themes-headings "1.0.0") -(make-obsolete 'modus-operandi-theme-scale-headings 'modus-themes-scale-headings "1.0.0") -(make-obsolete 'modus-operandi-theme-scale-1 'modus-themes-scale-1 "1.0.0") -(make-obsolete 'modus-operandi-theme-scale-2 'modus-themes-scale-2 "1.0.0") -(make-obsolete 'modus-operandi-theme-scale-3 'modus-themes-scale-3 "1.0.0") -(make-obsolete 'modus-operandi-theme-scale-4 'modus-themes-scale-4 "1.0.0") -(make-obsolete 'modus-operandi-theme-scale-5 'modus-themes-scale-5 "1.0.0") -(make-obsolete 'modus-operandi-theme-visible-fringes 'modus-themes-fringes "1.0.0") -(make-obsolete 'modus-operandi-theme-fringes 'modus-themes-fringes "1.0.0") -(make-obsolete 'modus-operandi-theme-distinct-org-blocks 'modus-themes-org-blocks "1.0.0") -(make-obsolete 'modus-operandi-theme-rainbow-org-src-blocks 'modus-themes-org-blocks "1.0.0") -(make-obsolete 'modus-operandi-theme-org-blocks 'modus-themes-org-blocks "1.0.0") -(make-obsolete 'modus-operandi-theme-3d-modeline 'modus-themes-mode-line "1.0.0") -(make-obsolete 'modus-operandi-theme-mode-line 'modus-themes-mode-line "1.0.0") -(make-obsolete 'modus-operandi-theme-subtle-diffs 'modus-themes-diffs "1.0.0") -(make-obsolete 'modus-operandi-theme-diffs 'modus-themes-diffs "1.0.0") -(make-obsolete 'modus-operandi-theme-intense-standard-completions 'modus-themes-completions "1.0.0") -(make-obsolete 'modus-operandi-theme-completions 'modus-themes-completions "1.0.0") -(make-obsolete 'modus-operandi-theme-prompts 'modus-themes-prompts "1.0.0") -(make-obsolete 'modus-operandi-theme-intense-hl-line 'modus-themes-intense-hl-line "1.0.0") -(make-obsolete 'modus-operandi-theme-intense-paren-match 'modus-themes-paren-match "1.0.0") -(make-obsolete 'modus-operandi-theme-faint-syntax 'modus-themes-syntax "1.0.0") -(make-obsolete 'modus-operandi-theme-comments 'modus-themes-syntax "1.0.0") -(make-obsolete 'modus-operandi-theme-syntax 'modus-themes-syntax "1.0.0") -(make-obsolete 'modus-operandi-theme-no-link-underline 'modus-themes-links "1.0.0") -(make-obsolete 'modus-operandi-theme-links 'modus-themes-links "1.0.0") - -;;;;; Modus Vivendi obsolete options - -(make-obsolete 'modus-vivendi-theme-override-colors-alist nil "1.0.0") -(make-obsolete 'modus-vivendi-theme-slanted-constructs 'modus-themes-slanted-constructs "1.0.0") -(make-obsolete 'modus-vivendi-theme-bold-constructs 'modus-themes-bold-constructs "1.0.0") -(make-obsolete 'modus-vivendi-theme-proportional-fonts 'modus-themes-variable-pitch-headings "1.0.0") -(make-obsolete 'modus-vivendi-theme-variable-pitch-headings 'modus-themes-variable-pitch-headings "1.0.0") -(make-obsolete 'modus-vivendi-theme-no-mixed-fonts 'modus-themes-no-mixed-fonts "1.0.0") -(make-obsolete 'modus-vivendi-theme-rainbow-headings 'modus-themes-headings "1.0.0") -(make-obsolete 'modus-vivendi-theme-section-headings 'modus-themes-headings "1.0.0") -(make-obsolete 'modus-vivendi-theme-headings 'modus-themes-headings "1.0.0") -(make-obsolete 'modus-vivendi-theme-scale-headings 'modus-themes-scale-headings "1.0.0") -(make-obsolete 'modus-vivendi-theme-scale-1 'modus-themes-scale-1 "1.0.0") -(make-obsolete 'modus-vivendi-theme-scale-2 'modus-themes-scale-2 "1.0.0") -(make-obsolete 'modus-vivendi-theme-scale-3 'modus-themes-scale-3 "1.0.0") -(make-obsolete 'modus-vivendi-theme-scale-4 'modus-themes-scale-4 "1.0.0") -(make-obsolete 'modus-vivendi-theme-scale-5 'modus-themes-scale-5 "1.0.0") -(make-obsolete 'modus-vivendi-theme-visible-fringes 'modus-themes-fringes "1.0.0") -(make-obsolete 'modus-vivendi-theme-fringes 'modus-themes-fringes "1.0.0") -(make-obsolete 'modus-vivendi-theme-distinct-org-blocks 'modus-themes-org-blocks "1.0.0") -(make-obsolete 'modus-vivendi-theme-rainbow-org-src-blocks 'modus-themes-org-blocks "1.0.0") -(make-obsolete 'modus-vivendi-theme-org-blocks 'modus-themes-org-blocks "1.0.0") -(make-obsolete 'modus-vivendi-theme-3d-modeline 'modus-themes-mode-line "1.0.0") -(make-obsolete 'modus-vivendi-theme-mode-line 'modus-themes-mode-line "1.0.0") -(make-obsolete 'modus-vivendi-theme-subtle-diffs 'modus-themes-diffs "1.0.0") -(make-obsolete 'modus-vivendi-theme-diffs 'modus-themes-diffs "1.0.0") -(make-obsolete 'modus-vivendi-theme-intense-standard-completions 'modus-themes-completions "1.0.0") -(make-obsolete 'modus-vivendi-theme-completions 'modus-themes-completions "1.0.0") -(make-obsolete 'modus-vivendi-theme-prompts 'modus-themes-prompts "1.0.0") -(make-obsolete 'modus-vivendi-theme-intense-hl-line 'modus-themes-intense-hl-line "1.0.0") -(make-obsolete 'modus-vivendi-theme-intense-paren-match 'modus-themes-paren-match "1.0.0") -(make-obsolete 'modus-vivendi-theme-faint-syntax 'modus-themes-syntax "1.0.0") -(make-obsolete 'modus-vivendi-theme-comments 'modus-themes-syntax "1.0.0") -(make-obsolete 'modus-vivendi-theme-syntax 'modus-themes-syntax "1.0.0") -(make-obsolete 'modus-vivendi-theme-no-link-underline 'modus-themes-links "1.0.0") -(make-obsolete 'modus-vivendi-theme-links 'modus-themes-links "1.0.0") +This is to account for red-green color deficiency. + +The present customization option should apply to all contexts where +there can be a color-coded distinction between success and failure, +to-do and done, and so on. + +Diffs, which have a red/green dichotomy by default, can also be +configured to conform with deuteranopia: `modus-themes-diffs'." + :group 'modus-themes + :package-version '(modus-themes . "1.4.0") + :version "28.1" + :type 'boolean + :link '(info-link "(modus-themes) Success' color-code")) + +(defcustom modus-themes-mail-citations nil + "Control the color of citations in messages or email clients. + +Nil (the default) means to use a variety of contrasting hues to +denote depth in nested citations. Colors are fairly easy to tell +apart. + +Option `faint' maintains a color-based distinction between +citation levels but the colors it applies have very subtle +differences between them. + +Option `monochrome' turns all citations that would otherwise be +colored into a uniform shade of shade of gray." + :group 'modus-themes + :package-version '(modus-themes . "1.4.0") + :version "28.1" + :type '(choice + (const :format "[%v] %t\n" :tag "Colorful mail citations with contrasting hues (default)" nil) + (const :format "[%v] %t\n" :tag "Like the default, but with less saturated colors" faint) + (const :format "[%v] %t\n" :tag "Deprecated alias of `faint'" desaturated) + (const :format "[%v] %t\n" :tag "Uniformly gray mail citations" monochrome)) + :link '(info-link "(modus-themes) Mail citations")) @@ -2464,7 +2468,7 @@ (defun modus-themes--current-theme () (car custom-enabled-themes)) ;; Helper functions that are meant to ease the implementation of the -;; above customization options. +;; above customization variables. (defun modus-themes--bold-weight () "Conditional use of a heavier text weight." (when modus-themes-bold-constructs @@ -2629,7 +2633,7 @@ (defun modus-themes--heading (level fg fg-alt bg border) background that can work well with either of the foreground values. BORDER is a color value that combines well with the background and alternative foreground." - (let* ((key (modus-themes--heading-p `,level)) + (let* ((key (modus-themes--heading-p level)) (style (or key (modus-themes--heading-p t))) (var (when modus-themes-variable-pitch-headings 'variable-pitch)) @@ -2638,55 +2642,58 @@ (defun modus-themes--heading (level fg fg-alt bg border) 'bold))) (pcase style ('no-bold - (list :inherit `,var :foreground fg)) + (list :inherit var :foreground fg)) ('no-color - (list :inherit `,varbold)) + (list :inherit varbold)) ('no-color-no-bold - (list :inherit `,var)) + (list :inherit var)) ('line - (list :inherit `,varbold :foreground fg :overline border)) + (list :inherit varbold :foreground fg :overline border)) ('line-no-bold - (list :inherit `,var :foreground fg :overline border)) + (list :inherit var :foreground fg :overline border)) ('rainbow - (list :inherit `,varbold :foreground fg-alt)) + (list :inherit varbold :foreground fg-alt)) ('rainbow-no-bold - (list :inherit `,var :foreground fg-alt)) + (list :inherit var :foreground fg-alt)) ('rainbow-line - (list :inherit `,varbold :foreground fg-alt :overline border)) + (list :inherit varbold :foreground fg-alt :overline border)) ('rainbow-line-no-bold - (list :inherit `,var :foreground fg-alt :overline border)) + (list :inherit var :foreground fg-alt :overline border)) ('highlight - (list :inherit `,varbold :background bg :foreground fg)) + (list :inherit varbold :background bg :foreground fg)) ('highlight-no-bold - (list :inherit `,var :background bg :foreground fg)) + (list :inherit var :background bg :foreground fg)) ('rainbow-highlight - (list :inherit `,varbold :background bg :foreground fg-alt)) + (list :inherit varbold :background bg :foreground fg-alt)) ('rainbow-highlight-no-bold - (list :inherit `,var :background bg :foreground fg-alt)) + (list :inherit var :background bg :foreground fg-alt)) ('section - (list :inherit `,varbold :background bg :foreground fg :overline border :extend t)) + (list :inherit varbold :background bg :foreground fg :overline border :extend t)) ('section-no-bold - (list :inherit `,var :background bg :foreground fg :overline border :extend t)) + (list :inherit var :background bg :foreground fg :overline border :extend t)) ('rainbow-section - (list :inherit `,varbold :background bg :foreground fg-alt :overline border :extend t)) + (list :inherit varbold :background bg :foreground fg-alt :overline border :extend t)) ('rainbow-section-no-bold - (list :inherit `,var :background bg :foreground fg-alt :overline border :extend t)) + (list :inherit var :background bg :foreground fg-alt :overline border :extend t)) (_ - (list :inherit `,varbold :foreground fg))))) + (list :inherit varbold :foreground fg))))) -(defun modus-themes--org-block (bgblk) +(defun modus-themes--org-block (bgblk fgdefault &optional fgblk) "Conditionally set the background of Org blocks. BGBLK applies to a distinct neutral background. Else blocks have no background of their own (the default), so they look the same -as the rest of the buffer. - -`modus-themes-org-blocks' also accepts a `rainbow' option -which is applied conditionally to `org-src-block-faces' (see the -theme's source code)." - (if (or (eq modus-themes-org-blocks 'grayscale) +as the rest of the buffer. FGDEFAULT is used when no distinct +background is present. While optional FGBLK specifies a +foreground value that can be combined with BGBLK. + +`modus-themes-org-blocks' also accepts `tinted-background' (alias +`rainbow') as a value which applies to `org-src-block-faces' (see +the theme's source code)." + (if (or (eq modus-themes-org-blocks 'gray-background) + (eq modus-themes-org-blocks 'grayscale) (eq modus-themes-org-blocks 'greyscale)) - (list :background bgblk :extend t) - (list :background 'unspecified))) + (list :background bgblk :foreground (or fgblk fgdefault) :extend t) + (list :background 'unspecified :foreground fgdefault))) (defun modus-themes--org-block-delim (bgaccent fgaccent bg fg) "Conditionally set the styles of Org block delimiters. @@ -2702,6 +2709,7 @@ (defun modus-themes--org-block-delim (bgaccent fgaccent bg fg) block, as it is used when `modus-themes-org-blocks' is set to `rainbow'." (pcase modus-themes-org-blocks + ('gray-background (list :background bg :foreground fg :extend t)) ('grayscale (list :background bg :foreground fg :extend t)) ('greyscale (list :background bg :foreground fg :extend t)) ('rainbow (list :background bgaccent :foreground fgaccent)) @@ -2721,9 +2729,9 @@ (defun modus-themes--mode-line-attrs "Color combinations for `modus-themes-mode-line'. FG and BG are the default colors. FG-ALT and BG-ALT are meant to -accommodate the options for a 3D modeline or a `moody' compliant +accommodate the options for a 3D mode line or a `moody' compliant one. FG-ACCENT and BG-ACCENT are used for all variants. BORDER -applies to all permutations of the modeline, except the +applies to all permutations of the mode line, except the three-dimensional effect, where BORDER-3D is used instead. Optional ALT-STYLE applies an appropriate style to the mode @@ -2737,38 +2745,49 @@ (defun modus-themes--mode-line-attrs property." (pcase modus-themes-mode-line ('3d - `(:background ,bg-alt :foreground ,fg-alt - :box (:line-width ,(or border-width 1) - :color ,border-3d - :style ,(and alt-style 'released-button)))) + `( :background ,bg-alt :foreground ,fg-alt + :box ( :line-width ,(or border-width 1) + :color ,border-3d + :style ,(and alt-style 'released-button)))) ('moody - `(:background ,bg-alt :foreground ,fg-alt - :underline ,border :overline ,border - :distant-foreground ,fg-distant)) + `( :background ,bg-alt :foreground ,fg-alt + :underline ,border :overline ,border + :distant-foreground ,fg-distant)) ('borderless - `(:foreground ,fg :background ,bg :box ,bg)) + `(:background ,bg :foreground ,fg :box ,bg)) ('borderless-3d - `(:foreground ,fg :background ,bg - :box (:line-width ,(or border-width 1) - :color ,bg - :style ,(and alt-style 'released-button)))) + `( :background ,bg :foreground ,fg + :box ( :line-width ,(or border-width 1) + :color ,bg + :style ,(and alt-style 'released-button)))) ('borderless-moody - `(:background ,bg :foreground ,fg - :underline ,bg :overline ,bg - :distant-foreground ,fg-distant)) + `( :background ,bg :foreground ,fg + :underline ,bg :overline ,bg + :distant-foreground ,fg-distant)) ('accented - `(:foreground ,fg-accent :background ,bg-accent :box ,border)) + `(:background ,bg-accent :foreground ,fg-accent :box ,border)) ('accented-3d - `(:background ,bg-accent :foreground ,fg-accent - :box (:line-width ,(or border-width 1) - :color ,border-3d - :style ,(and alt-style 'released-button)))) + `( :background ,bg-accent :foreground ,fg-accent + :box ( :line-width ,(or border-width 1) + :color ,border-3d + :style ,(and alt-style 'released-button)))) ('accented-moody - `(:background ,bg-accent :foreground ,fg-accent - :underline ,border :overline ,border - :distant-foreground ,fg-distant)) + `( :background ,bg-accent :foreground ,fg-accent + :underline ,border :overline ,border + :distant-foreground ,fg-distant)) + ('borderless-accented + `(:background ,bg-accent :foreground ,fg-accent :box ,bg-accent)) + ('borderless-accented-3d + `( :background ,bg-accent :foreground ,fg-accent + :box ( :line-width ,(or border-width 1) + :color ,bg-accent + :style ,(and alt-style 'released-button)))) + ('borderless-accented-moody + `( :background ,bg-accent :foreground ,fg-accent + :underline ,bg-accent :overline ,bg-accent + :distant-foreground ,fg-distant)) (_ - `(:foreground ,fg :background ,bg :box ,border)))) + `(:background ,bg :foreground ,fg :box ,border)))) (defun modus-themes--diff (fg-only-bg fg-only-fg mainbg mainfg altbg altfg &optional deuteranbg deuteranfg bg-only-fg) @@ -2792,6 +2811,7 @@ (defun modus-themes--diff unspecified." (pcase modus-themes-diffs ('fg-only (list :background fg-only-bg :foreground fg-only-fg)) + ('fg-only-deuteranopia (list :background fg-only-bg :foreground fg-only-fg)) ('desaturated (list :background altbg :foreground altfg)) ('deuteranopia (list :background (or deuteranbg mainbg) :foreground (or deuteranfg mainfg))) ('bg-only (list :background altbg :foreground (if bg-only-fg altfg 'unspecified))) @@ -2801,19 +2821,17 @@ (defun modus-themes--diff-deuteran (deuteran main) "Determine whether the DEUTERAN or MAIN color should be used. This is based on whether `modus-themes-diffs' has the value `deuteranopia'." - (if (eq modus-themes-diffs 'deuteranopia) + (if (or (eq modus-themes-diffs 'deuteranopia) + (eq modus-themes-diffs 'fg-only-deuteranopia) + (eq modus-themes-diffs 'fg-only)) (list deuteran) (list main))) -(defun modus-themes--diff-text (fg-only-fg default-fg) - "Like `modus-themes--diff', but only for foregrounds. -FG-ONLY-FG is the foreground that is used when diffs are styled -using only foreground colors. DEFAULT-FG covers all other -cases." - (pcase modus-themes-diffs - ('fg-only (list :foreground fg-only-fg)) - ('bg-only (list :foreground 'unspecified)) - (_ (list :foreground default-fg)))) +(defun modus-themes--success-deuteran (deuteran main) + "Determine whether to color-code success as DEUTERAN or MAIN." + (if modus-themes-success-deuteranopia + (list deuteran) + (list main))) (defun modus-themes--standard-completions (mainfg subtlebg intensebg intensefg) "Combinations for `modus-themes-completions'. @@ -2895,24 +2913,36 @@ (defun modus-themes--region (bg fg bgsubtle bgaccent) ('accent-no-extend (list :background bgaccent :foreground fg :extend nil)) (_ (list :background bg :foreground fg)))) -(defun modus-themes--hl-line (bgdefault bgintense bgaccent lineneutral lineaccent) +(defun modus-themes--hl-line (bgdefault bgintense bgaccent bgaccentul lineneutral lineaccent) "Apply `modus-themes-hl-line' styles. BGDEFAULT is a subtle neutral background. BGINTENSE is like the -default, but more prominent. BGACCENT is a subtle accented -background. LINENEUTRAL and LINEACCENT are a color values that -can remain distinct against the buffer's possible backgrounds: -the former is neutral, the latter is accented. LINEONLY must be -a prominent neutral color." +default, but more prominent. BGACCENT is a prominent accented +background, while BGACCENTUL is more subtle and is meant to be +used in tandem with an underline. LINENEUTRAL and LINEACCENT are +a color values that can remain distinct against the buffer's +possible backgrounds: the former is neutral, the latter is +accented." (pcase modus-themes-hl-line ('intense-background (list :background bgintense)) ('accented-background (list :background bgaccent)) ('underline-neutral (list :background bgdefault :underline lineneutral)) - ('underline-accented (list :background bgaccent :underline lineaccent)) + ('underline-accented (list :background bgaccentul :underline lineaccent)) ('underline-only-neutral (list :background 'unspecified :underline lineneutral)) ('underline-only-accented (list :background 'unspecified :underline lineaccent)) (_ (list :background bgdefault)))) +(defun modus-themes--mail-cite (mainfg subtlefg) + "Combinations for `modus-themes-mail-citations'. + +MAINFG is an accented foreground value. SUBTLEFG is its +desaturated counterpart." + (pcase modus-themes-mail-citations + ('monochrome (list :inherit 'shadow)) + ('faint (list :foreground subtlefg)) + ('desaturated (list :foreground subtlefg)) + (_ (list :foreground mainfg)))) + ;;;; Utilities for DIY users @@ -3132,7 +3162,7 @@ ;;;;; diff-specific combinations ;; intended for `diff-mode' or equivalent `(modus-themes-diff-added ((,class ,@(modus-themes--diff - bg-main green + bg-main blue-alt-other bg-diff-focus-added fg-diff-focus-added green-nuanced-bg fg-diff-added bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran)))) @@ -3148,7 +3178,7 @@ ;;;;; diff-specific combinations red-nuanced-bg fg-diff-removed)))) `(modus-themes-diff-refine-added ((,class ,@(modus-themes--diff - bg-diff-added fg-diff-added + bg-diff-added-deuteran fg-diff-added-deuteran bg-diff-refine-added fg-diff-refine-added bg-diff-focus-added fg-diff-focus-added bg-diff-refine-added-deuteran fg-diff-refine-added-deuteran)))) @@ -3164,7 +3194,7 @@ ;;;;; diff-specific combinations bg-diff-focus-removed fg-diff-focus-removed)))) `(modus-themes-diff-focus-added ((,class ,@(modus-themes--diff - bg-dim green + bg-dim blue-alt-other bg-diff-focus-added fg-diff-focus-added bg-diff-added fg-diff-added bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran)))) @@ -3180,7 +3210,7 @@ ;;;;; diff-specific combinations bg-diff-removed fg-diff-removed)))) `(modus-themes-diff-heading ((,class ,@(modus-themes--diff - bg-main blue + bg-alt fg-main bg-diff-heading fg-diff-heading cyan-nuanced-bg cyan-nuanced-fg bg-header fg-main @@ -3221,7 +3251,7 @@ ;;;;; heading levels 7 red-nuanced-fg red-alt red-nuanced-bg bg-region)))) `(modus-themes-heading-8 ((,class ,@(modus-themes--heading - 8 fg-dim magenta bg-alt bg-region)))) + 8 magenta-nuanced-fg magenta bg-alt bg-region)))) ;;;;; graph-specific faces `(modus-themes-graph-red-0 ((,class :background ,red-graph-0-bg))) `(modus-themes-graph-red-1 ((,class :background ,red-graph-1-bg))) @@ -3236,21 +3266,41 @@ ;;;;; graph-specific faces `(modus-themes-graph-cyan-0 ((,class :background ,cyan-graph-0-bg))) `(modus-themes-graph-cyan-1 ((,class :background ,cyan-graph-1-bg))) ;;;;; language checkers - `(modus-themes-lang-error ((,class ,@(modus-themes--lang-check fg-lang-underline-error fg-lang-error red red-nuanced-bg)))) - `(modus-themes-lang-note ((,class ,@(modus-themes--lang-check fg-lang-underline-note fg-lang-note blue-alt blue-nuanced-bg)))) - `(modus-themes-lang-warning ((,class ,@(modus-themes--lang-check fg-lang-underline-warning fg-lang-warning yellow yellow-nuanced-bg)))) + `(modus-themes-lang-error ((,class ,@(modus-themes--lang-check + fg-lang-underline-error + fg-lang-error + red red-nuanced-bg)))) + `(modus-themes-lang-note ((,class ,@(modus-themes--lang-check + fg-lang-underline-note + fg-lang-note + blue-alt blue-nuanced-bg)))) + `(modus-themes-lang-warning ((,class ,@(modus-themes--lang-check + fg-lang-underline-warning + fg-lang-warning + yellow yellow-nuanced-bg)))) ;;;;; other custom faces `(modus-themes-bold ((,class ,@(modus-themes--bold-weight)))) - `(modus-themes-hl-line ((,class ,@(modus-themes--hl-line bg-hl-line bg-hl-line-intense blue-nuanced-bg - bg-region blue-intense-bg) + `(modus-themes-hl-line ((,class ,@(modus-themes--hl-line + bg-hl-line bg-hl-line-intense + bg-hl-line-intense-accent blue-nuanced-bg + bg-region blue-intense-bg) :extend t))) `(modus-themes-key-binding ((,class :inherit bold :foreground ,blue-alt-other))) - `(modus-themes-slant ((,class :inherit italic :slant ,@(modus-themes--slant)))) - `(modus-themes-variable-pitch ((,class ,@(modus-themes--variable-pitch)))) + `(modus-themes-reset-hard ((,class :inherit (fixed-pitch modus-themes-reset-soft)))) `(modus-themes-reset-soft ((,class :background ,bg-main :foreground ,fg-main :weight normal :slant normal :strike-through nil :box nil :underline nil :overline nil :extend nil))) - `(modus-themes-reset-hard ((,class :inherit (fixed-pitch modus-themes-reset-soft)))) + `(modus-themes-search-success ((,class :inherit ,@(modus-themes--success-deuteran + 'modus-themes-intense-blue + 'modus-themes-intense-green)))) + `(modus-themes-search-success-lazy ((,class :inherit ,@(modus-themes--success-deuteran + 'modus-themes-special-mild + 'modus-themes-refine-cyan)))) + `(modus-themes-search-success-modeline ((,class :foreground ,@(modus-themes--success-deuteran + blue-active + green-active)))) + `(modus-themes-slant ((,class :inherit italic :slant ,@(modus-themes--slant)))) + `(modus-themes-variable-pitch ((,class ,@(modus-themes--variable-pitch)))) ;;;; standard faces ;;;;; absolute essentials `(default ((,class :background ,bg-main :foreground ,fg-main))) @@ -3293,7 +3343,7 @@ ;;;;; basic and/or ungrouped styles `(region ((,class ,@(modus-themes--region bg-region fg-main bg-hl-alt-intense bg-region-accent)))) `(secondary-selection ((,class :inherit modus-themes-special-cold))) `(shadow ((,class :foreground ,fg-alt))) - `(success ((,class :inherit bold :foreground ,green))) + `(success ((,class :inherit bold :foreground ,@(modus-themes--success-deuteran blue green)))) `(trailing-whitespace ((,class :background ,red-intense-bg))) `(warning ((,class :inherit bold :foreground ,yellow))) ;;;;; buttons, links, widgets @@ -3304,10 +3354,8 @@ ;;;;; buttons, links, widgets ,@(modus-themes--link-color magenta-alt-other magenta-alt-other-faint fg-alt)))) `(tooltip ((,class :background ,bg-special-cold :foreground ,fg-main))) - `(widget-button ((,class :inherit button))) - `(widget-button-pressed ((,class :inherit button - ,@(modus-themes--link-color - magenta magenta-faint)))) + `(widget-button ((,class :inherit bold :foreground ,blue-alt))) + `(widget-button-pressed ((,class :inherit widget-button :foreground ,magenta))) `(widget-documentation ((,class :foreground ,green))) `(widget-field ((,class :background ,bg-alt :foreground ,fg-dim))) `(widget-inactive ((,class :background ,bg-inactive :foreground ,fg-inactive))) @@ -3364,12 +3412,12 @@ ;;;;; annotate `(annotate-highlight-secondary ((,class :background ,green-nuanced-bg :underline ,green-intense))) ;;;;; anzu `(anzu-match-1 ((,class :inherit modus-themes-subtle-cyan))) - `(anzu-match-2 ((,class :inherit modus-themes-subtle-green))) + `(anzu-match-2 ((,class :inherit modus-themes-search-success))) `(anzu-match-3 ((,class :inherit modus-themes-subtle-yellow))) - `(anzu-mode-line ((,class :inherit bold :foreground ,green-active))) + `(anzu-mode-line ((,class :inherit (bold modus-themes-search-success-modeline)))) `(anzu-mode-line-no-match ((,class :inherit bold :foreground ,red-active))) `(anzu-replace-highlight ((,class :inherit modus-themes-refine-yellow :underline t))) - `(anzu-replace-to ((,class :inherit (modus-themes-intense-green bold)))) + `(anzu-replace-to ((,class :inherit (modus-themes-search-success bold)))) ;;;;; apropos `(apropos-function-button ((,class :inherit button ,@(modus-themes--link-color @@ -3485,6 +3533,8 @@ ;;;;; boon `(boon-modeline-ins ((,class :inherit modus-themes-active-red))) `(boon-modeline-off ((,class :inherit modus-themes-active-yellow))) `(boon-modeline-spc ((,class :inherit modus-themes-active-green))) +;;;;; bookmark + `(bookmark-face ((,class :inherit modus-themes-special-warm :extend t))) ;;;;; breakpoint (built-in gdb-mi.el) `(breakpoint-disabled ((,class :inherit shadow))) `(breakpoint-enabled ((,class :inherit bold :foreground ,red))) @@ -3524,7 +3574,7 @@ ;;;;; calfw `(cfw:face-toolbar-button-on ((,class :inherit bold :background ,blue-nuanced-bg :foreground ,blue-alt))) ;;;;; centaur-tabs - `(centaur-tabs-active-bar-face ((,class :background ,fg-tab-accent))) + `(centaur-tabs-active-bar-face ((,class :background ,blue-active))) `(centaur-tabs-close-mouse-face ((,class :inherit bold :foreground ,red-active :underline t))) `(centaur-tabs-close-selected ((,class :inherit centaur-tabs-selected))) `(centaur-tabs-close-unselected ((,class :inherit centaur-tabs-unselected))) @@ -3584,7 +3634,9 @@ ;;;;; cider :background ,bg-alt :foreground ,fg-alt))) `(cider-test-error-face ((,class :inherit modus-themes-subtle-red))) `(cider-test-failure-face ((,class :inherit (modus-themes-intense-red bold)))) - `(cider-test-success-face ((,class :inherit modus-themes-intense-green))) + `(cider-test-success-face ((,class :inherit ,@(modus-themes--success-deuteran + 'modus-themes-intense-blue + 'modus-themes-intense-green)))) `(cider-traced-face ((,class :box (:line-width -1 :color ,cyan :style nil) :background ,bg-dim))) `(cider-warning-highlight-face ((,class :foreground ,yellow :underline t))) ;;;;; circe (and lui) @@ -3626,8 +3678,8 @@ ;;;;; company-mode `(company-tooltip-common ((,class :inherit bold :foreground ,blue-alt))) `(company-tooltip-common-selection ((,class :foreground ,fg-main))) `(company-tooltip-mouse ((,class :inherit modus-themes-intense-blue))) - `(company-tooltip-search ((,class :inherit (modus-themes-refine-cyan bold)))) - `(company-tooltip-search-selection ((,class :inherit (modus-themes-intense-green bold) :underline t))) + `(company-tooltip-search ((,class :inherit (modus-themes-search-success-lazy bold)))) + `(company-tooltip-search-selection ((,class :inherit (modus-themes-search-success bold) :underline t))) `(company-tooltip-selection ((,class :inherit (modus-themes-subtle-cyan bold)))) ;;;;; company-posframe `(company-posframe-active-backend-name ((,class :inherit bold :background ,bg-active :foreground ,blue-active))) @@ -3665,10 +3717,10 @@ ;;;;; consult `(consult-preview-error ((,class :inherit modus-themes-intense-red))) `(consult-preview-line ((,class :background ,bg-hl-alt-intense))) ;;;;; corfu - `(corfu-background ((,class :background ,bg-alt :foreground ,fg-alt))) + `(corfu-background ((,class :background ,bg-alt))) `(corfu-current ((,class :inherit bold :background ,cyan-subtle-bg))) - `(corfu-bar ((,class :background ,fg-alt :foreground ,fg-alt))) - `(corfu-border ((,class :background ,bg-active :foreground ,bg-region))) + `(corfu-bar ((,class :background ,fg-alt))) + `(corfu-border ((,class :background ,bg-active))) ;;;;; counsel `(counsel-active-mode ((,class :foreground ,magenta-alt-other))) `(counsel-application-name ((,class :foreground ,red-alt-other))) @@ -3690,11 +3742,6 @@ ;;;;; counsel-css `(counsel-css-selector-depth-face-4 ((,class :foreground ,yellow))) `(counsel-css-selector-depth-face-5 ((,class :foreground ,magenta))) `(counsel-css-selector-depth-face-6 ((,class :foreground ,red))) -;;;;; counsel-notmuch - `(counsel-notmuch-count-face ((,class :foreground ,cyan))) - `(counsel-notmuch-date-face ((,class :foreground ,blue))) - `(counsel-notmuch-people-face ((,class :foreground ,magenta))) - `(counsel-notmuch-subject-face ((,class :foreground ,magenta-alt-other))) ;;;;; counsel-org-capture-string `(counsel-org-capture-string-template-body-face ((,class :foreground ,fg-special-cold))) ;;;;; cov @@ -3709,11 +3756,11 @@ ;;;;; cperl-mode `(cperl-array-face ((,class :inherit font-lock-keyword-face))) `(cperl-hash-face ((,class :inherit font-lock-variable-name-face))) ;;;;; csv-mode - `(csv-separator-face ((,class :background ,bg-special-cold :foreground ,fg-main))) + `(csv-separator-face ((,class :foreground ,red-intense))) ;;;;; ctrlf - `(ctrlf-highlight-active ((,class :inherit (modus-themes-intense-green bold)))) + `(ctrlf-highlight-active ((,class :inherit (modus-themes-search-success bold)))) `(ctrlf-highlight-line ((,class :inherit modus-themes-hl-line))) - `(ctrlf-highlight-passive ((,class :inherit modus-themes-refine-cyan))) + `(ctrlf-highlight-passive ((,class :inherit modus-themes-search-success-lazy))) ;;;;; custom (M-x customize) `(custom-button ((,class :box (:line-width 2 :color nil :style released-button) :background ,bg-active :foreground ,fg-main))) @@ -3764,7 +3811,7 @@ ;;;;; debbugs `(debbugs-gnu-archived ((,class :inverse-video t))) `(debbugs-gnu-done ((,class :inherit shadow))) `(debbugs-gnu-forwarded ((,class :foreground ,fg-special-warm))) - `(debbugs-gnu-handled ((,class :foreground ,green))) + `(debbugs-gnu-handled ((,class :foreground ,blue))) `(debbugs-gnu-new ((,class :foreground ,red))) `(debbugs-gnu-pending ((,class :foreground ,cyan))) `(debbugs-gnu-stale-1 ((,class :foreground ,yellow-nuanced-fg))) @@ -3797,16 +3844,18 @@ ;;;;; diff-hl `(diff-hl-dired-ignored ((,class :inherit dired-ignored))) `(diff-hl-dired-insert ((,class :inherit diff-hl-insert))) `(diff-hl-dired-unknown ((,class :inherit dired-ignored))) - `(diff-hl-insert ((,class :inherit modus-themes-fringe-green))) - `(diff-hl-reverted-hunk-highlight ((,class :inherit (modus-themes-active-magenta bold)))) + `(diff-hl-insert ((,class :inherit ,@(modus-themes--diff-deuteran + 'modus-themes-fringe-blue + 'modus-themes-fringe-green)))) + `(diff-hl-reverted-hunk-highlight ((,class :background ,fg-main :foreground ,bg-main))) ;;;;; diff-mode `(diff-added ((,class :inherit modus-themes-diff-added))) `(diff-changed ((,class :inherit modus-themes-diff-changed :extend t))) - `(diff-context ((,class ,@(modus-themes--diff-text fg-main fg-unfocused)))) + `(diff-context ((,class :foreground ,fg-alt))) `(diff-error ((,class :inherit modus-themes-intense-red))) `(diff-file-header ((,class :inherit (bold diff-header)))) `(diff-function ((,class :inherit modus-themes-diff-heading))) - `(diff-header ((,class ,@(modus-themes--diff-text cyan-faint fg-main)))) + `(diff-header ((,class :foreground ,fg-main))) `(diff-hunk-header ((,class :inherit (bold modus-themes-diff-heading)))) `(diff-index ((,class :inherit bold :foreground ,blue-alt))) `(diff-indicator-added ((,class :inherit (diff-added bold) @@ -3975,7 +4024,9 @@ ;;;;; doom-modeline `(doom-modeline-host ((,class :inherit italic))) `(doom-modeline-info ((,class :foreground ,green-active))) `(doom-modeline-lsp-error ((,class :inherit bold :foreground ,red-active))) - `(doom-modeline-lsp-success ((,class :inherit bold :foreground ,green-active))) + `(doom-modeline-lsp-success ((,class :inherit bold :foreground ,@(modus-themes--success-deuteran + blue-active + green-active)))) `(doom-modeline-lsp-warning ((,class :inherit bold :foreground ,yellow-active))) `(doom-modeline-panel ((,class :inherit modus-themes-active-blue))) `(doom-modeline-persp-buffer-not-in-persp ((,class :inherit italic :foreground ,yellow-active))) @@ -4007,13 +4058,13 @@ ;;;;; ebdb `(ebdb-phone-default ((,class :foreground ,cyan))) `(eieio-custom-slot-tag-face ((,class :foreground ,red-alt))) ;;;;; ediff - `(ediff-current-diff-A ((,class :inherit modus-themes-diff-removed))) + `(ediff-current-diff-A ((,class :inherit modus-themes-diff-focus-removed))) `(ediff-current-diff-Ancestor ((,class ,@(modus-themes--diff bg-alt fg-special-cold bg-special-cold fg-special-cold blue-nuanced-bg blue)))) - `(ediff-current-diff-B ((,class :inherit modus-themes-diff-added))) - `(ediff-current-diff-C ((,class :inherit modus-themes-diff-changed))) + `(ediff-current-diff-B ((,class :inherit modus-themes-diff-focus-added))) + `(ediff-current-diff-C ((,class :inherit modus-themes-diff-focus-changed))) `(ediff-even-diff-A ((,class :background ,bg-alt))) `(ediff-even-diff-Ancestor ((,class :background ,bg-alt))) `(ediff-even-diff-B ((,class :background ,bg-alt))) @@ -4030,7 +4081,7 @@ ;;;;; eglot `(eglot-mode-line ((,class :inherit modus-themes-bold :foreground ,magenta-active))) ;;;;; el-search `(el-search-highlight-in-prompt-face ((,class :inherit bold :foreground ,magenta-alt))) - `(el-search-match ((,class :inherit modus-themes-intense-green))) + `(el-search-match ((,class :inherit modus-themes-search-success))) `(el-search-other-match ((,class :inherit modus-themes-special-mild))) `(el-search-occur-match ((,class :inherit modus-themes-special-calm))) ;;;;; eldoc @@ -4083,7 +4134,7 @@ ;;;;; epa `(epa-validity-medium ((,class :foreground ,green-alt))) ;;;;; equake `(equake-buffer-face ((,class :background ,bg-main :foreground ,fg-main))) - `(equake-shell-type-eshell ((,class :background ,bg-inactive :foreground ,green-active))) + `(equake-shell-type-eshell ((,class :background ,bg-inactive :foreground ,blue-active))) `(equake-shell-type-rash ((,class :background ,bg-inactive :foreground ,red-active))) `(equake-shell-type-shell ((,class :background ,bg-inactive :foreground ,cyan-active))) `(equake-shell-type-term ((,class :background ,bg-inactive :foreground ,yellow-active))) @@ -4153,67 +4204,56 @@ ;;;;; ert `(ert-test-result-expected ((,class :inherit modus-themes-intense-green))) `(ert-test-result-unexpected ((,class :inherit modus-themes-intense-red))) ;;;;; eshell - `(eshell-ls-archive ((,class :inherit bold :foreground ,cyan-alt))) - `(eshell-ls-backup ((,class :foreground ,yellow-alt))) + `(eshell-ls-archive ((,class :foreground ,cyan-alt))) + `(eshell-ls-backup ((,class :inherit shadow))) `(eshell-ls-clutter ((,class :foreground ,red-alt))) - `(eshell-ls-directory ((,class :inherit bold :foreground ,blue-alt))) + `(eshell-ls-directory ((,class :foreground ,blue-alt))) `(eshell-ls-executable ((,class :foreground ,magenta-alt))) `(eshell-ls-missing ((,class :inherit modus-themes-intense-red))) - `(eshell-ls-product ((,class :foreground ,fg-special-warm))) - `(eshell-ls-readonly ((,class :foreground ,fg-special-cold))) - `(eshell-ls-special ((,class :inherit bold :foreground ,magenta))) - `(eshell-ls-symlink ((,class :inherit button - ,@(modus-themes--link-color - cyan cyan-faint)))) + `(eshell-ls-product ((,class :inherit shadow))) + `(eshell-ls-readonly ((,class :foreground ,yellow-faint))) + `(eshell-ls-special ((,class :foreground ,magenta))) + `(eshell-ls-symlink ((,class :foreground ,cyan))) `(eshell-ls-unreadable ((,class :background ,bg-inactive :foreground ,fg-inactive))) - `(eshell-prompt ((,class :inherit modus-themes-bold - ,@(modus-themes--prompt - green-alt-other - green-nuanced-bg green-alt - green-refine-bg fg-main)))) + `(eshell-prompt ((,class :inherit comint-highlight-prompt))) ;;;;; eshell-fringe-status - `(eshell-fringe-status-failure ((,class :foreground ,red))) - `(eshell-fringe-status-success ((,class :foreground ,green))) + `(eshell-fringe-status-failure ((,class :inherit error))) + `(eshell-fringe-status-success ((,class :inherit success))) ;;;;; eshell-git-prompt - `(eshell-git-prompt-add-face ((,class :inherit shadow))) - `(eshell-git-prompt-branch-face ((,class :inherit shadow))) - `(eshell-git-prompt-directory-face ((,class :foreground ,cyan))) - `(eshell-git-prompt-exit-fail-face ((,class :foreground ,red))) - `(eshell-git-prompt-exit-success-face ((,class :foreground ,green))) + `(eshell-git-prompt-add-face ((,class :foreground ,magenta-alt-other))) + `(eshell-git-prompt-branch-face ((,class :foreground ,magenta-alt))) + `(eshell-git-prompt-directory-face ((,class :inherit bold :foreground ,blue))) + `(eshell-git-prompt-exit-fail-face ((,class :inherit error))) + `(eshell-git-prompt-exit-success-face ((,class :inherit success))) `(eshell-git-prompt-modified-face ((,class :foreground ,yellow))) `(eshell-git-prompt-powerline-clean-face ((,class :background ,green-refine-bg))) `(eshell-git-prompt-powerline-dir-face ((,class :background ,blue-refine-bg))) - `(eshell-git-prompt-powerline-not-clean-face ((,class :background ,magenta-refine-bg))) - `(eshell-git-prompt-robyrussell-branch-face ((,class :foreground ,red))) + `(eshell-git-prompt-powerline-not-clean-face ((,class :background ,yellow-fringe-bg))) + `(eshell-git-prompt-robyrussell-branch-face ((,class :foreground ,magenta-alt))) `(eshell-git-prompt-robyrussell-git-dirty-face ((,class :foreground ,yellow))) - `(eshell-git-prompt-robyrussell-git-face ((,class :foreground ,blue))) + `(eshell-git-prompt-robyrussell-git-face ((,class :foreground ,magenta-alt-other))) ;;;;; eshell-prompt-extras (epe) - `(epe-dir-face ((,class :inherit modus-themes-bold :foreground ,blue))) + `(epe-dir-face ((,class :inherit bold :foreground ,blue))) `(epe-git-dir-face ((,class :foreground ,red-alt-other))) - `(epe-git-face ((,class :foreground ,cyan-alt))) - `(epe-pipeline-delimiter-face ((,class :foreground ,green-alt))) - `(epe-pipeline-host-face ((,class :foreground ,blue))) - `(epe-pipeline-time-face ((,class :foreground ,fg-special-warm))) - `(epe-pipeline-user-face ((,class :foreground ,magenta))) - `(epe-remote-face ((,class :inherit modus-themes-slant :foreground ,fg-alt))) + `(epe-git-face ((,class :foreground ,magenta-alt))) + `(epe-pipeline-delimiter-face ((,class :inherit shadow))) + `(epe-pipeline-host-face ((,class :foreground ,fg-main))) + `(epe-pipeline-time-face ((,class :foreground ,fg-main))) + `(epe-pipeline-user-face ((,class :foreground ,magenta-alt-other))) + `(epe-remote-face ((,class :inherit (shadow modus-themes-slant)))) `(epe-status-face ((,class :foreground ,magenta-alt-other))) - `(epe-venv-face ((,class :inherit modus-themes-slant :foreground ,fg-alt))) + `(epe-venv-face ((,class :inherit (shadow modus-themes-slant)))) ;;;;; eshell-syntax-highlighting - `(eshell-syntax-highlighting-alias-face ((,class :foreground ,cyan))) - `(eshell-syntax-highlighting-comment-face ((,class :inherit shadow))) - `(eshell-syntax-highlighting-directory-face ((,class :foreground ,blue))) - `(eshell-syntax-highlighting-envvar-face ((,class :foreground ,magenta-alt))) + `(eshell-syntax-highlighting-directory-face ((,class :inherit eshell-ls-directory))) `(eshell-syntax-highlighting-invalid-face ((,class :foreground ,red))) - `(eshell-syntax-highlighting-lisp-function-face ((,class :foreground ,magenta))) - `(eshell-syntax-highlighting-shell-command-face ((,class :foreground ,cyan-alt-other))) - `(eshell-syntax-highlighting-string-face ((,class :foreground ,blue-alt))) + `(eshell-syntax-highlighting-shell-command-face ((,class :foreground ,fg-main))) ;;;;; evil-mode `(evil-ex-commands ((,class :foreground ,magenta-alt-other))) `(evil-ex-info ((,class :foreground ,cyan-alt-other))) - `(evil-ex-lazy-highlight ((,class :inherit modus-themes-refine-cyan))) - `(evil-ex-search ((,class :inherit modus-themes-intense-green))) + `(evil-ex-lazy-highlight ((,class :inherit modus-themes-search-success-lazy))) + `(evil-ex-search ((,class :inherit modus-themes-search-success))) `(evil-ex-substitute-matches ((,class :inherit modus-themes-refine-yellow :underline t))) - `(evil-ex-substitute-replacement ((,class :inherit (modus-themes-intense-green bold)))) + `(evil-ex-substitute-replacement ((,class :inherit (modus-themes-search-success bold)))) ;;;;; evil-goggles `(evil-goggles-change-face ((,class :inherit modus-themes-refine-yellow))) `(evil-goggles-commentary-face ((,class :inherit (modus-themes-subtle-neutral modus-themes-slant)))) @@ -4279,7 +4319,10 @@ ;;;;; flycheck-indicator `(flycheck-indicator-error ((,class :inherit modus-themes-bold :foreground ,red-active))) `(flycheck-indicator-info ((,class :inherit modus-themes-bold :foreground ,blue-active))) `(flycheck-indicator-running ((,class :inherit modus-themes-bold :foreground ,magenta-active))) - `(flycheck-indicator-success ((,class :inherit modus-themes-bold :foreground ,green-active))) + `(flycheck-indicator-success ((,class :inherit modus-themes-bold + :foreground ,@(modus-themes--success-deuteran + blue-active + green-active)))) `(flycheck-indicator-warning ((,class :inherit modus-themes-bold :foreground ,yellow-active))) ;;;;; flycheck-posframe `(flycheck-posframe-background-face ((,class :background ,bg-alt))) @@ -4417,17 +4460,23 @@ ;;;;; git-commit `(git-commit-pseudo-header ((,class :foreground ,blue))) `(git-commit-summary ((,class :inherit bold :foreground ,cyan))) ;;;;; git-gutter - `(git-gutter:added ((,class :inherit modus-themes-fringe-green))) + `(git-gutter:added ((,class :inherit ,@(modus-themes--diff-deuteran + 'modus-themes-fringe-blue + 'modus-themes-fringe-green)))) `(git-gutter:deleted ((,class :inherit modus-themes-fringe-red))) `(git-gutter:modified ((,class :inherit modus-themes-fringe-yellow))) `(git-gutter:separator ((,class :inherit modus-themes-fringe-cyan))) `(git-gutter:unchanged ((,class :inherit modus-themes-fringe-magenta))) ;;;;; git-gutter-fr - `(git-gutter-fr:added ((,class :inherit modus-themes-fringe-green))) + `(git-gutter-fr:added ((,class :inherit ,@(modus-themes--diff-deuteran + 'modus-themes-fringe-blue + 'modus-themes-fringe-green)))) `(git-gutter-fr:deleted ((,class :inherit modus-themes-fringe-red))) `(git-gutter-fr:modified ((,class :inherit modus-themes-fringe-yellow))) ;;;;; git-{gutter,fringe}+ - `(git-gutter+-added ((,class :inherit modus-themes-fringe-green))) + `(git-gutter+-added ((,class :inherit ,@(modus-themes--diff-deuteran + 'modus-themes-fringe-blue + 'modus-themes-fringe-green)))) `(git-gutter+-deleted ((,class :inherit modus-themes-fringe-red))) `(git-gutter+-modified ((,class :inherit modus-themes-fringe-yellow))) `(git-gutter+-separator ((,class :inherit modus-themes-fringe-cyan))) @@ -4436,7 +4485,7 @@ ;;;;; git-{gutter,fringe}+ `(git-gutter-fr+-deleted ((,class :inherit modus-themes-fringe-red))) `(git-gutter-fr+-modified ((,class :inherit modus-themes-fringe-yellow))) ;;;;; git-lens - `(git-lens-added ((,class :inherit bold :foreground ,green))) + `(git-lens-added ((,class :inherit bold :foreground ,@(modus-themes--diff-deuteran blue green)))) `(git-lens-deleted ((,class :inherit bold :foreground ,red))) `(git-lens-header ((,class :inherit bold :height 1.1 :foreground ,cyan))) `(git-lens-modified ((,class :inherit bold :foreground ,yellow))) @@ -4460,17 +4509,17 @@ ;;;;; git-walktree `(git-walktree-tree-face ((,class :foreground ,magenta))) ;;;;; gnus `(gnus-button ((,class :inherit button))) - `(gnus-cite-1 ((,class :foreground ,blue-faint))) - `(gnus-cite-10 ((,class :foreground ,yellow-alt-other))) - `(gnus-cite-11 ((,class :foreground ,magenta-alt))) - `(gnus-cite-2 ((,class :foreground ,green-alt-other))) - `(gnus-cite-3 ((,class :foreground ,red-alt-other))) - `(gnus-cite-4 ((,class :foreground ,cyan))) - `(gnus-cite-5 ((,class :foreground ,yellow-alt))) - `(gnus-cite-6 ((,class :foreground ,magenta))) - `(gnus-cite-7 ((,class :foreground ,green-alt))) - `(gnus-cite-8 ((,class :foreground ,magenta-alt-other))) - `(gnus-cite-9 ((,class :foreground ,cyan-alt))) + `(gnus-cite-1 ((,class :inherit message-cited-text-1))) + `(gnus-cite-2 ((,class :inherit message-cited-text-2))) + `(gnus-cite-3 ((,class :inherit message-cited-text-3))) + `(gnus-cite-4 ((,class :inherit message-cited-text-4))) + `(gnus-cite-5 ((,class :inherit gnus-cite-1))) + `(gnus-cite-6 ((,class :inherit gnus-cite-2))) + `(gnus-cite-7 ((,class :inherit gnus-cite-3))) + `(gnus-cite-8 ((,class :inherit gnus-cite-4))) + `(gnus-cite-9 ((,class :inherit gnus-cite-1))) + `(gnus-cite-10 ((,class :inherit gnus-cite-2))) + `(gnus-cite-11 ((,class :inherit gnus-cite-3))) `(gnus-cite-attribution ((,class :inherit italic :foreground ,fg-main))) `(gnus-emphasis-bold ((,class :inherit bold))) `(gnus-emphasis-bold-italic ((,class :inherit bold-italic))) @@ -4497,8 +4546,8 @@ ;;;;; gnus `(gnus-group-news-4-empty ((,class :foreground ,cyan-nuanced-fg))) `(gnus-group-news-5 ((,class :inherit bold :foreground ,red-nuanced-fg))) `(gnus-group-news-5-empty ((,class :foreground ,red-nuanced-fg))) - `(gnus-group-news-6 ((,class :inherit bold :foreground ,fg-alt))) - `(gnus-group-news-6-empty ((,class :inherit shadow))) + `(gnus-group-news-6 ((,class :inherit bold :foreground ,fg-unfocused))) + `(gnus-group-news-6-empty ((,class :foreground ,fg-unfocused))) `(gnus-group-news-low ((,class :inherit bold :foreground ,green-nuanced-fg))) `(gnus-group-news-low-empty ((,class :foreground ,green-nuanced-fg))) `(gnus-header-content ((,class :inherit message-header-other))) @@ -4722,8 +4771,8 @@ ;;;;; highlight-defined `(highlight-defined-special-form-name-face ((,class :foreground ,magenta-alt-other))) `(highlight-defined-variable-name-face ((,class :foreground ,cyan))) ;;;;; highlight-escape-sequences (`hes-mode') - `(hes-escape-backslash-face ((,class :inherit bold :foreground ,fg-escape-char-construct))) - `(hes-escape-sequence-face ((,class :inherit bold :foreground ,fg-escape-char-backslash))) + `(hes-escape-backslash-face ((,class :inherit font-lock-regexp-grouping-construct))) + `(hes-escape-sequence-face ((,class :inherit font-lock-regexp-grouping-backslash))) ;;;;; highlight-indentation `(highlight-indentation-face ((,class :inherit modus-themes-hl-line))) `(highlight-indentation-current-column-face ((,class :background ,bg-active))) @@ -4843,18 +4892,20 @@ ;;;;; ioccur `(ioccur-title-face ((,class :inherit bold :foreground ,red-alt ,@(modus-themes--scale modus-themes-scale-4)))) ;;;;; isearch, occur, and the like - `(isearch ((,class :inherit (modus-themes-intense-green bold)))) + `(isearch ((,class :inherit (modus-themes-search-success bold)))) `(isearch-fail ((,class :inherit modus-themes-refine-red))) - `(isearch-group-1 ((,class :inherit modus-themes-intense-blue))) - `(isearch-group-2 ((,class :inherit modus-themes-intense-magenta))) - `(lazy-highlight ((,class :inherit modus-themes-refine-cyan))) + `(isearch-group-1 ((,class :inherit modus-themes-refine-blue))) + `(isearch-group-2 ((,class :inherit modus-themes-refine-magenta))) + `(lazy-highlight ((,class :inherit modus-themes-search-success-lazy))) `(match ((,class :inherit modus-themes-special-calm))) `(query-replace ((,class :inherit (modus-themes-intense-yellow bold)))) ;;;;; isl (isearch-light) - `(isl-line ((,class :inherit modus-themes-subtle-green))) - `(isl-match ((,class :inherit modus-themes-refine-cyan))) - `(isl-number ((,class :inherit modus-themes-bold :foreground ,green-active))) - `(isl-on ((,class :inherit (bold modus-themes-intense-green)))) + `(isl-line ((,class :inherit ,@(modus-themes--success-deuteran + 'modus-themes-subtle-blue + 'modus-themes-subtle-green)))) + `(isl-match ((,class :inherit modus-themes-search-success-lazy))) + `(isl-number ((,class :inherit (modus-themes-bold modus-themes-search-success-modeline)))) + `(isl-on ((,class :inherit (bold modus-themes-search-success)))) `(isl-string ((,class :inherit modus-themes-bold :foreground ,cyan-active))) ;;;;; ivy `(ivy-action ((,class :inherit bold :foreground ,red-alt))) @@ -4959,9 +5010,9 @@ ;;;;; jupyter `(jupyter-repl-output-prompt ((,class :foreground ,magenta-alt-other))) `(jupyter-repl-traceback ((,class :inherit modus-themes-intense-red))) ;;;;; kaocha-runner - `(kaocha-runner-error-face ((,class :foreground ,red))) - `(kaocha-runner-success-face ((,class :foreground ,green))) - `(kaocha-runner-warning-face ((,class :foreground ,yellow))) + `(kaocha-runner-error-face ((,class :inherit error))) + `(kaocha-runner-success-face ((,class :inherit success))) + `(kaocha-runner-warning-face ((,class :inherit warning))) ;;;;; keycast `(keycast-command ((,class :inherit bold :foreground ,blue-active))) `(keycast-key ((,class :background ,blue-active :foreground ,bg-main))) @@ -5058,7 +5109,7 @@ ;;;;; magit ;; not the highlighted ones. This is because Magit's interaction ;; model relies on highlighting the current diff hunk. `(magit-diff-added ((,class ,@(modus-themes--diff - bg-main green + bg-main blue-alt-other bg-diff-added fg-diff-added green-nuanced-bg fg-diff-added bg-diff-added-deuteran fg-diff-added-deuteran)))) @@ -5072,17 +5123,23 @@ ;;;;; magit `(magit-diff-context-highlight ((,class ,@(modus-themes--diff bg-dim fg-dim bg-inactive fg-inactive + bg-dim fg-alt bg-dim fg-alt)))) `(magit-diff-file-heading ((,class :inherit bold :foreground ,fg-special-cold))) `(magit-diff-file-heading-highlight ((,class :inherit (modus-themes-special-cold bold)))) `(magit-diff-file-heading-selection ((,class :inherit modus-themes-refine-cyan))) ;; NOTE: here we break from the pattern of inheriting from the ;; modus-themes-diff-* faces. - `(magit-diff-hunk-heading ((,class :inherit bold :background ,bg-active - :foreground ,fg-inactive))) + `(magit-diff-hunk-heading ((,class :inherit bold + ,@(modus-themes--diff + bg-alt fg-alt + bg-active fg-inactive + bg-inactive fg-inactive + bg-inactive fg-inactive + t)))) `(magit-diff-hunk-heading-highlight ((,class :inherit bold - :background ,@(modus-themes--diff-deuteran bg-region bg-diff-heading) + :background ,@(modus-themes--diff-deuteran bg-active bg-diff-heading) :foreground ,@(modus-themes--diff-deuteran fg-main fg-diff-heading)))) `(magit-diff-hunk-heading-selection ((,class :inherit modus-themes-refine-blue))) `(magit-diff-hunk-region ((,class :inherit bold))) @@ -5128,7 +5185,9 @@ ;;;;; magit `(magit-section-heading ((,class :inherit bold :foreground ,cyan))) `(magit-section-heading-selection ((,class :inherit (modus-themes-refine-cyan bold)))) `(magit-section-highlight ((,class :background ,bg-alt))) - `(magit-sequence-done ((,class :foreground ,green-alt))) + `(magit-sequence-done ((,class :foreground ,@(modus-themes--success-deuteran + blue + green)))) `(magit-sequence-drop ((,class :foreground ,red-alt))) `(magit-sequence-exec ((,class :foreground ,magenta-alt))) `(magit-sequence-head ((,class :foreground ,cyan-alt))) @@ -5140,7 +5199,9 @@ ;;;;; magit `(magit-signature-error ((,class :foreground ,red-alt))) `(magit-signature-expired ((,class :foreground ,yellow))) `(magit-signature-expired-key ((,class :foreground ,yellow))) - `(magit-signature-good ((,class :foreground ,green))) + `(magit-signature-good ((,class :foreground ,@(modus-themes--success-deuteran + blue + green)))) `(magit-signature-revoked ((,class :foreground ,magenta))) `(magit-signature-untrusted ((,class :foreground ,cyan))) `(magit-tag ((,class :foreground ,yellow-alt-other))) @@ -5275,10 +5336,10 @@ ;;;;; mentor `(mentor-highlight-face ((,class :inherit modus-themes-subtle-blue))) `(mentor-tracker-name ((,class :foreground ,magenta-alt))) ;;;;; messages - `(message-cited-text-1 ((,class :foreground ,blue-faint))) - `(message-cited-text-2 ((,class :foreground ,green-alt-other))) - `(message-cited-text-3 ((,class :foreground ,red-alt-other))) - `(message-cited-text-4 ((,class :foreground ,cyan))) + `(message-cited-text-1 ((,class ,@(modus-themes--mail-cite blue-faint fg-alt)))) + `(message-cited-text-2 ((,class ,@(modus-themes--mail-cite green-faint fg-comment-yellow)))) + `(message-cited-text-3 ((,class ,@(modus-themes--mail-cite red-faint fg-special-cold)))) + `(message-cited-text-4 ((,class ,@(modus-themes--mail-cite yellow-faint fg-special-calm)))) `(message-header-cc ((,class :foreground ,blue-alt-other))) `(message-header-name ((,class :inherit bold :foreground ,cyan))) `(message-header-newsgroups ((,class :inherit message-header-other))) @@ -5286,7 +5347,7 @@ ;;;;; messages `(message-header-subject ((,class :inherit bold :foreground ,magenta-alt))) `(message-header-to ((,class :inherit bold :foreground ,magenta-alt-other))) `(message-header-xheader ((,class :foreground ,blue-alt))) - `(message-mml ((,class :foreground ,yellow))) + `(message-mml ((,class :foreground ,cyan-alt-other))) `(message-separator ((,class :inherit modus-themes-intense-neutral))) ;;;;; minibuffer-line `(minibuffer-line ((,class :foreground ,fg-main))) @@ -5302,7 +5363,7 @@ ;;;;; mmm-mode `(mmm-init-submode-face ((,class :background ,magenta-nuanced-bg))) `(mmm-output-submode-face ((,class :background ,red-nuanced-bg))) `(mmm-special-submode-face ((,class :background ,green-nuanced-bg))) -;;;;; modeline +;;;;; mode-line `(mode-line ((,class ,@(modus-themes--variable-pitch-ui) ,@(modus-themes--mode-line-attrs fg-active bg-active @@ -5324,7 +5385,9 @@ ;;;;; mood-line `(mood-line-status-error ((,class :inherit bold :foreground ,red-active))) `(mood-line-status-info ((,class :foreground ,cyan-active))) `(mood-line-status-neutral ((,class :foreground ,blue-active))) - `(mood-line-status-success ((,class :foreground ,green-active))) + `(mood-line-status-success ((,class :foreground ,@(modus-themes--success-deuteran + blue-active + green-active)))) `(mood-line-status-warning ((,class :inherit bold :foreground ,yellow-active))) `(mood-line-unimportant ((,class :foreground ,fg-inactive))) ;;;;; mpdel @@ -5332,13 +5395,13 @@ ;;;;; mpdel `(mpdel-playlist-current-song-face ((,class :inherit bold :foreground ,blue-alt-other))) ;;;;; mu4e `(mu4e-attach-number-face ((,class :inherit bold :foreground ,fg-dim))) - `(mu4e-cited-1-face ((,class :foreground ,blue-faint))) - `(mu4e-cited-2-face ((,class :foreground ,green-alt-other))) - `(mu4e-cited-3-face ((,class :foreground ,red-alt-other))) - `(mu4e-cited-4-face ((,class :foreground ,cyan))) - `(mu4e-cited-5-face ((,class :foreground ,yellow-alt))) - `(mu4e-cited-6-face ((,class :foreground ,magenta))) - `(mu4e-cited-7-face ((,class :foreground ,green-alt))) + `(mu4e-cited-1-face ((,class :inherit message-cited-text-1))) + `(mu4e-cited-2-face ((,class :inherit message-cited-text-2))) + `(mu4e-cited-3-face ((,class :inherit message-cited-text-3))) + `(mu4e-cited-4-face ((,class :inherit message-cited-text-4))) + `(mu4e-cited-5-face ((,class :inherit message-cited-text-1))) + `(mu4e-cited-6-face ((,class :inherit message-cited-text-2))) + `(mu4e-cited-7-face ((,class :inherit message-cited-text-3))) `(mu4e-compose-header-face ((,class :inherit mu4e-compose-separator-face))) `(mu4e-compose-separator-face ((,class :inherit modus-themes-intense-neutral))) `(mu4e-contact-face ((,class :inherit message-header-to))) @@ -5392,7 +5455,7 @@ ;;;;; neotree `(neo-file-link-face ((,class :foreground ,fg-main))) `(neo-header-face ((,class :inherit bold :foreground ,fg-main))) `(neo-root-dir-face ((,class :inherit bold :foreground ,cyan-alt))) - `(neo-vc-added-face ((,class :foreground ,green))) + `(neo-vc-added-face ((,class :foreground ,@(modus-themes--diff-deuteran blue green)))) `(neo-vc-conflict-face ((,class :inherit bold :foreground ,red))) `(neo-vc-default-face ((,class :foreground ,fg-main))) `(neo-vc-edited-face ((,class :foreground ,yellow))) @@ -5407,33 +5470,33 @@ ;;;;; neotree ;;;;; no-emoji `(no-emoji ((,class :foreground ,cyan))) ;;;;; notmuch - `(notmuch-crypto-decryption ((,class :inherit modus-themes-special-mild))) + `(notmuch-crypto-decryption ((,class :inherit (shadow bold)))) `(notmuch-crypto-part-header ((,class :foreground ,magenta-alt-other))) - `(notmuch-crypto-signature-bad ((,class :inherit modus-themes-intense-red))) - `(notmuch-crypto-signature-good ((,class :inherit modus-themes-refine-blue))) - `(notmuch-crypto-signature-good-key ((,class :inherit modus-themes-refine-cyan))) - `(notmuch-crypto-signature-unknown ((,class :inherit modus-themes-refine-red))) + `(notmuch-crypto-signature-bad ((,class :inherit error))) + `(notmuch-crypto-signature-good ((,class :inherit success))) + `(notmuch-crypto-signature-good-key ((,class :inherit bold :foreground ,cyan))) + `(notmuch-crypto-signature-unknown ((,class :inherit warning))) `(notmuch-hello-logo-background ((,class :background "gray50"))) - `(notmuch-message-summary-face ((,class :inherit modus-themes-nuanced-cyan))) + `(notmuch-message-summary-face ((,class :inherit (bold modus-themes-nuanced-cyan)))) `(notmuch-search-count ((,class :inherit shadow))) `(notmuch-search-date ((,class :foreground ,cyan))) `(notmuch-search-flagged-face ((,class :foreground ,red-alt))) - `(notmuch-search-matching-authors ((,class :foreground ,fg-main))) + `(notmuch-search-matching-authors ((,class :foreground ,fg-special-cold))) `(notmuch-search-non-matching-authors ((,class :inherit shadow))) - `(notmuch-search-subject ((,class :foreground ,fg-dim))) + `(notmuch-search-subject ((,class :foreground ,fg-main))) `(notmuch-search-unread-face ((,class :inherit bold))) - `(notmuch-tag-added ((,class :inherit modus-themes-lang-note))) - `(notmuch-tag-deleted ((,class :inherit modus-themes-lang-error))) - `(notmuch-tag-face ((,class :inherit bold :foreground ,blue-alt))) + `(notmuch-tag-added ((,class :underline ,blue))) + `(notmuch-tag-deleted ((,class :strike-through ,red))) + `(notmuch-tag-face ((,class :foreground ,blue))) `(notmuch-tag-flagged ((,class :foreground ,red-alt))) `(notmuch-tag-unread ((,class :foreground ,magenta-alt))) - `(notmuch-tree-match-author-face ((,class :foreground ,fg-special-cold))) + `(notmuch-tree-match-author-face ((,class :inherit notmuch-search-matching-authors))) `(notmuch-tree-match-date-face ((,class :inherit notmuch-search-date))) `(notmuch-tree-match-face ((,class :foreground ,fg-main))) - `(notmuch-tree-match-tag-face ((,class :inherit bold :foreground ,blue-alt))) + `(notmuch-tree-match-tag-face ((,class :inherit notmuch-tag-face))) `(notmuch-tree-no-match-face ((,class :inherit shadow))) `(notmuch-tree-no-match-date-face ((,class :inherit shadow))) - `(notmuch-wash-cited-text ((,class :foreground ,cyan))) + `(notmuch-wash-cited-text ((,class :inherit message-cited-text-1))) `(notmuch-wash-toggle-button ((,class :background ,bg-alt :foreground ,fg-alt))) ;;;;; num3-mode `(num3-face-even ((,class :inherit bold :background ,bg-alt))) @@ -5505,8 +5568,7 @@ ;;;;; org :foreground ,blue-alt))) `(org-archived ((,class :background ,bg-alt :foreground ,fg-alt))) `(org-block ((,class ,@(modus-themes--mixed-fonts) - ,@(modus-themes--org-block bg-dim) - :foreground ,fg-main))) + ,@(modus-themes--org-block bg-dim fg-main)))) `(org-block-begin-line ((,class ,@(modus-themes--mixed-fonts) ,@(modus-themes--org-block-delim bg-dim fg-special-cold @@ -5533,7 +5595,7 @@ ;;;;; org :foreground ,fg-alt))) `(org-document-title ((,class :inherit (bold modus-themes-variable-pitch) :foreground ,fg-special-cold ,@(modus-themes--scale modus-themes-scale-5)))) - `(org-done ((,class :foreground ,green))) + `(org-done ((,class :foreground ,@(modus-themes--success-deuteran blue green)))) `(org-drawer ((,class ,@(modus-themes--mixed-fonts) :foreground ,fg-alt))) `(org-ellipsis (())) ; inherits from the heading's color @@ -5574,7 +5636,10 @@ ;;;;; org green-graph-1-bg green-graph-0-bg green-graph-1-bg)))) - `(org-headline-done ((,class :inherit modus-themes-variable-pitch :foreground ,green-nuanced-fg))) + `(org-headline-done ((,class :inherit modus-themes-variable-pitch + :foreground ,@(modus-themes--success-deuteran + blue-nuanced-fg + green-nuanced-fg)))) `(org-headline-todo ((,class :inherit modus-themes-variable-pitch :foreground ,red-nuanced-fg))) `(org-hide ((,class :foreground ,bg-main))) `(org-indent ((,class :inherit (fixed-pitch org-hide)))) @@ -5597,7 +5662,7 @@ ;;;;; org `(org-priority ((,class :foreground ,magenta))) `(org-property-value ((,class ,@(modus-themes--mixed-fonts) :foreground ,fg-special-cold))) - `(org-quote ((,class ,@(modus-themes--org-block bg-dim)))) + `(org-quote ((,class ,@(modus-themes--org-block bg-dim fg-special-cold fg-main)))) `(org-scheduled ((,class :foreground ,magenta-alt))) `(org-scheduled-previously ((,class :foreground ,yellow-alt-other))) `(org-scheduled-today ((,class :foreground ,magenta-alt-other))) @@ -5736,15 +5801,17 @@ ;;;;; phi-grep ;;;;; phi-search `(phi-replace-preview-face ((,class :inherit modus-themes-intense-magenta))) `(phi-search-failpart-face ((,class :inherit modus-themes-refine-red))) - `(phi-search-match-face ((,class :inherit modus-themes-refine-cyan))) - `(phi-search-selection-face ((,class :inherit (modus-themes-intense-green bold)))) + `(phi-search-match-face ((,class :inherit modus-themes-search-success-lazy))) + `(phi-search-selection-face ((,class :inherit (modus-themes-search-success bold)))) ;;;;; pkgbuild-mode `(pkgbuild-error-face ((,class :inherit modus-themes-lang-error))) ;;;;; pomidor `(pomidor-break-face ((,class :foreground ,blue-alt-other))) `(pomidor-overwork-face ((,class :foreground ,red-alt-other))) `(pomidor-skip-face ((,class :inherit modus-themes-slant :foreground ,fg-alt))) - `(pomidor-work-face ((,class :foreground ,green-alt-other))) + `(pomidor-work-face ((,class :foreground ,@(modus-themes--success-deuteran + blue-alt + green-alt-other)))) ;;;;; popup `(popup-face ((,class :background ,bg-alt :foreground ,fg-main))) `(popup-isearch-match ((,class :inherit (modus-themes-refine-cyan bold)))) @@ -5943,7 +6010,7 @@ ;;;;; selectrum `(selectrum-quick-keys-highlight ((,class :inherit modus-themes-refine-red))) `(selectrum-quick-keys-match - ((,class :inherit (bold modus-themes-intense-green)))) + ((,class :inherit (bold modus-themes-search-success)))) ;;;;; selectrum-prescient `(selectrum-prescient-primary-highlight ((,class :inherit bold @@ -5983,7 +6050,7 @@ ;;;;; show-paren-mode `(show-paren-match ((,class ,@(modus-themes--paren bg-paren-match bg-paren-match-intense) :foreground ,fg-main))) - `(show-paren-match-expression ((,class :inherit modus-themes-special-calm))) + `(show-paren-match-expression ((,class :background ,bg-paren-expression))) `(show-paren-mismatch ((,class :inherit modus-themes-intense-red))) ;;;;; shr `(shr-abbreviation ((,class :inherit modus-themes-lang-note))) @@ -6149,22 +6216,14 @@ ;;;;; syslog-mode `(syslog-su ((,class :inherit bold :foreground ,red-alt))) `(syslog-warn ((,class :inherit bold :foreground ,yellow))) ;;;;; tab-bar-groups - `(tab-bar-groups-1 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,blue-tab))) - `(tab-bar-groups-1-group-name ((,class :inherit tab-bar-groups-1 :inverse-video t))) - `(tab-bar-groups-2 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,red-tab))) - `(tab-bar-groups-2-group-name ((,class :inherit tab-bar-groups-2 :inverse-video t))) - `(tab-bar-groups-3 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,green-tab))) - `(tab-bar-groups-3-group-name ((,class :inherit tab-bar-groups-3 :inverse-video t))) - `(tab-bar-groups-4 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,orange-tab))) - `(tab-bar-groups-4-group-name ((,class :inherit tab-bar-groups-4 :inverse-video t))) - `(tab-bar-groups-5 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,purple-tab))) - `(tab-bar-groups-5-group-name ((,class :inherit tab-bar-groups-5 :inverse-video t))) - `(tab-bar-groups-6 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,cyan-tab))) - `(tab-bar-groups-6-group-name ((,class :inherit tab-bar-groups-6 :inverse-video t))) - `(tab-bar-groups-7 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,yellow-tab))) - `(tab-bar-groups-7-group-name ((,class :inherit tab-bar-groups-7 :inverse-video t))) - `(tab-bar-groups-8 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,magenta-tab))) - `(tab-bar-groups-8-group-name ((,class :inherit tab-bar-groups-8 :inverse-video t))) + `(tab-bar-groups-tab-1 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,blue-tab))) + `(tab-bar-groups-tab-2 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,red-tab))) + `(tab-bar-groups-tab-3 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,green-tab))) + `(tab-bar-groups-tab-4 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,orange-tab))) + `(tab-bar-groups-tab-5 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,purple-tab))) + `(tab-bar-groups-tab-6 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,cyan-tab))) + `(tab-bar-groups-tab-7 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,yellow-tab))) + `(tab-bar-groups-tab-8 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,magenta-tab))) ;;;;; tab-bar-mode `(tab-bar ((,class ,@(modus-themes--variable-pitch-ui) :background ,bg-tab-bar :foreground ,fg-main))) @@ -6254,7 +6313,9 @@ ;;;;; transient `(transient-argument ((,class :inherit bold :foreground ,red-alt))) `(transient-blue ((,class :inherit bold :foreground ,blue))) `(transient-disabled-suffix ((,class :inherit modus-themes-intense-red))) - `(transient-enabled-suffix ((,class :inherit modus-themes-intense-green))) + `(transient-enabled-suffix ((,class :inherit ,@(modus-themes--success-deuteran + 'modus-themes-subtle-blue + 'modus-themes-subtle-green)))) `(transient-heading ((,class :inherit bold :foreground ,fg-main))) `(transient-inactive-argument ((,class :inherit shadow))) `(transient-inactive-value ((,class :inherit shadow))) @@ -6291,7 +6352,9 @@ ;;;;; treemacs `(treemacs-help-column-face ((,class :inherit modus-themes-bold :foreground ,magenta-alt-other :underline t))) `(treemacs-help-title-face ((,class :foreground ,blue-alt-other))) `(treemacs-on-failure-pulse-face ((,class :inherit modus-themes-intense-red))) - `(treemacs-on-success-pulse-face ((,class :inherit modus-themes-intense-green))) + `(treemacs-on-success-pulse-face ((,class :inherit ,@(modus-themes--success-deuteran + 'modus-themes-intense-blue + 'modus-themes-intense-green)))) `(treemacs-root-face ((,class :inherit bold :foreground ,blue-alt-other :height 1.2 :underline t))) `(treemacs-root-remote-disconnected-face ((,class :inherit treemacs-root-remote-face :foreground ,yellow))) `(treemacs-root-remote-face ((,class :inherit treemacs-root-face :foreground ,magenta))) @@ -6563,9 +6626,9 @@ ;;;; flymake fringe indicators `(flymake-note-bitmap '(exclamation-mark modus-themes-fringe-cyan)) ;;;; ibuffer `(ibuffer-deletion-face 'modus-themes-mark-del) - `(ibuffer-filter-group-name-face 'modus-themes-mark-symbol) + `(ibuffer-filter-group-name-face 'modus-themes-pseudo-header) `(ibuffer-marked-face 'modus-themes-mark-sel) - `(ibuffer-title-face 'modus-themes-pseudo-header) + `(ibuffer-title-face 'default) ;;;; highlight-tail `(highlight-tail-colors '((,green-subtle-bg . 0) @@ -6619,7 +6682,8 @@ ;;;; vc-annotate (C-x v g) ;;;; xterm-color `(xterm-color-names ["black" ,red ,green ,yellow ,blue ,magenta ,cyan "gray65"]) `(xterm-color-names-bright ["gray35" ,red-alt ,green-alt ,yellow-alt ,blue-alt ,magenta-alt ,cyan-alt "white"]) - (if (eq modus-themes-org-blocks 'rainbow) + (if (or (eq modus-themes-org-blocks 'tinted-background) + (eq modus-themes-org-blocks 'rainbow)) `(org-src-block-faces ; TODO this list should be expanded `(("emacs-lisp" modus-themes-nuanced-magenta) ("elisp" modus-themes-nuanced-magenta) diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index ff59d3009b..fa8ba217f0 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -4,7 +4,7 @@ ;;; modus-vivendi-theme.el --- Accessible dark theme (WCAG AAA) -*- lexical-bind ;; Author: Protesilaos Stavrou ;; URL: https://gitlab.com/protesilaos/modus-themes -;; Version: 1.3.2 +;; Version: 1.4.0 ;; Package-Requires: ((emacs "26.1")) ;; Keywords: faces, theme, accessibility -- 2.31.1