mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
90 lines
3.5 KiB
EmacsLisp
90 lines
3.5 KiB
EmacsLisp
;;; modus-operandi-theme.el --- Elegant, highly legible theme with a white 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))
|
||
|
||
(defcustom modus-operandi-palette-user nil
|
||
"Like the `modus-operandi-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-operandi-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-operandi-palette-overrides nil
|
||
"Overrides for `modus-operandi-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-operandi
|
||
'modus-themes
|
||
"Elegant, highly legible theme with a white background.
|
||
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)."
|
||
'light
|
||
'modus-themes-operandi-palette
|
||
'modus-operandi-palette-user
|
||
'modus-operandi-palette-overrides)
|
||
|
||
;;; modus-operandi-theme.el ends here
|