mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
We need this because otherwise the autolaods are not generated properly, which can cause problems for other packages that need to read the theme data.
101 lines
3.9 KiB
EmacsLisp
101 lines
3.9 KiB
EmacsLisp
;;; modus-vivendi-deuteranopia-theme.el --- Deuteranopia-optimized theme with a black background -*- lexical-binding:t -*-
|
||
|
||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||
|
||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||
;; URL: https://github.com/protesilaos/modus-themes
|
||
;; Keywords: faces, theme, accessibility
|
||
|
||
;; This file is part of GNU Emacs.
|
||
|
||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||
;; it under the terms of the GNU General Public License as published by
|
||
;; the Free Software Foundation, either version 3 of the License, or
|
||
;; (at your option) any later version.
|
||
;;
|
||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
;; GNU General Public License for more details.
|
||
;;
|
||
;; You should have received a copy of the GNU General Public License
|
||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||
|
||
;;; Commentary:
|
||
;;
|
||
;; The Modus themes conform with the highest standard for
|
||
;; color-contrast accessibility between background and foreground
|
||
;; values (WCAG AAA). They are also highly customizable and can even
|
||
;; be used as the basis for other themes. Please refer to the official
|
||
;; Info manual for further documentation (distributed with the themes,
|
||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||
|
||
;;; Code:
|
||
|
||
|
||
|
||
(unless (and (fboundp 'require-theme)
|
||
load-file-name
|
||
(equal (file-name-directory load-file-name)
|
||
(expand-file-name "themes/" data-directory))
|
||
(require-theme 'modus-themes t))
|
||
(require 'modus-themes))
|
||
|
||
;;;###theme-autoload
|
||
(deftheme modus-vivendi-deuteranopia
|
||
"Deuteranopia-optimized theme with a black background."
|
||
:background-mode 'dark
|
||
:kind 'color-scheme
|
||
:family 'modus)
|
||
|
||
(defcustom modus-vivendi-deuteranopia-palette-user nil
|
||
"Like the `modus-vivendi-deuteranopia-palette' for user-defined entries.
|
||
This is meant to extend the palette with custom named colors and/or
|
||
semantic palette mappings. Those may then be used in combination with
|
||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||
`modus-vivendi-deuteranopia-palette-overrides')."
|
||
:group 'modus-themes
|
||
:package-version '(modus-themes . "4.5.0")
|
||
:type '(repeat (list symbol (choice symbol string)))
|
||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||
|
||
(defcustom modus-vivendi-deuteranopia-palette-overrides nil
|
||
"Overrides for `modus-vivendi-deuteranopia-palette'.
|
||
|
||
Mirror the elements of the aforementioned palette, overriding
|
||
their value.
|
||
|
||
For overrides that are shared across all of the Modus themes,
|
||
refer to `modus-themes-common-palette-overrides'.
|
||
|
||
Theme-specific overrides take precedence over shared overrides.
|
||
The idea of common overrides is to change semantic color
|
||
mappings, such as to make the cursor red. Wherea theme-specific
|
||
overrides can also be used to change the value of a named color,
|
||
such as what hexadecimal RGB value the red-warmer symbol
|
||
represents."
|
||
:group 'modus-themes
|
||
:package-version '(modus-themes . "4.0.0")
|
||
:version "30.1"
|
||
:type '(repeat (list symbol (choice symbol string)))
|
||
:link '(info-link "(modus-themes) Palette overrides"))
|
||
|
||
(modus-themes-theme
|
||
'modus-vivendi-deuteranopia
|
||
'modus-themes
|
||
"Deuteranopia-optimized theme with a black background.
|
||
This variant is optimized for users with red-green color
|
||
deficiency (deuteranopia). It conforms with the highest
|
||
legibility standard for color contrast between background and
|
||
foreground in any given piece of text, which corresponds to a
|
||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||
standard)."
|
||
'dark
|
||
'modus-themes-vivendi-deuteranopia-palette
|
||
'modus-vivendi-deuteranopia-palette-user
|
||
'modus-vivendi-deuteranopia-palette-overrides
|
||
'modus-themes-faces-deuteranopia)
|
||
|
||
;;; modus-vivendi-deuteranopia-theme.el ends here
|