modus-vivendi-tinted-theme.el (14326B)
1 ;;; modus-vivendi-tinted-theme.el --- Elegant, highly legible theme with a night sky background -*- lexical-binding:t -*- 2 3 ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. 4 5 ;; Author: Protesilaos Stavrou <info@protesilaos.com> 6 ;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht> 7 ;; URL: https://git.sr.ht/~protesilaos/modus-themes 8 ;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes 9 10 ;; This file is part of GNU Emacs. 11 12 ;; GNU Emacs is free software: you can redistribute it and/or modify 13 ;; it under the terms of the GNU General Public License as published by 14 ;; the Free Software Foundation, either version 3 of the License, or 15 ;; (at your option) any later version. 16 ;; 17 ;; GNU Emacs is distributed in the hope that it will be useful, 18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 ;; GNU General Public License for more details. 21 ;; 22 ;; You should have received a copy of the GNU General Public License 23 ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 24 25 ;;; Commentary: 26 ;; 27 ;; The Modus themes conform with the highest standard for 28 ;; color-contrast accessibility between background and foreground 29 ;; values (WCAG AAA). Please refer to the official Info manual for 30 ;; further documentation (distributed with the themes, or available 31 ;; at: <https://protesilaos.com/emacs/modus-themes>). 32 33 ;;; Code: 34 35 36 37 (eval-and-compile 38 (unless (and (fboundp 'require-theme) 39 load-file-name 40 (equal (file-name-directory load-file-name) 41 (expand-file-name "themes/" data-directory)) 42 (require-theme 'modus-themes t)) 43 (require 'modus-themes)) 44 45 ;;;###theme-autoload 46 (deftheme modus-vivendi-tinted 47 "Elegant, highly legible theme with a night sky background. 48 Conforms with the highest legibility standard for color contrast 49 between background and foreground in any given piece of text, 50 which corresponds to a minimum contrast in relative luminance of 51 7:1 (WCAG AAA standard)." 52 :background-mode 'dark 53 :kind 'color-scheme 54 :family 'modus) 55 56 (defconst modus-vivendi-tinted-palette 57 '( 58 ;;; Basic values 59 60 (bg-main "#0d0e1c") 61 (bg-dim "#1d2235") 62 (fg-main "#ffffff") 63 (fg-dim "#989898") 64 (fg-alt "#c6daff") 65 (bg-active "#4a4f69") 66 (bg-inactive "#2b3045") 67 (border "#61647a") 68 69 ;;; Common accent foregrounds 70 71 (red "#ff5f59") 72 (red-warmer "#ff6b55") 73 (red-cooler "#ff7f9f") 74 (red-faint "#ff9f80") 75 (red-intense "#ff5f5f") 76 (green "#44bc44") 77 (green-warmer "#70b900") 78 (green-cooler "#00c06f") 79 (green-faint "#88ca9f") 80 (green-intense "#44df44") 81 (yellow "#d0bc00") 82 (yellow-warmer "#fec43f") 83 (yellow-cooler "#dfaf7a") 84 (yellow-faint "#d2b580") 85 (yellow-intense "#efef00") 86 (blue "#2fafff") 87 (blue-warmer "#79a8ff") 88 (blue-cooler "#00bcff") 89 (blue-faint "#82b0ec") 90 (blue-intense "#338fff") 91 (magenta "#feacd0") 92 (magenta-warmer "#f78fe7") 93 (magenta-cooler "#b6a0ff") 94 (magenta-faint "#caa6df") 95 (magenta-intense "#ff66ff") 96 (cyan "#00d3d0") 97 (cyan-warmer "#4ae2f0") 98 (cyan-cooler "#6ae4b9") 99 (cyan-faint "#9ac8e0") 100 (cyan-intense "#00eff0") 101 102 ;;; Uncommon accent foregrounds 103 104 (rust "#db7b5f") 105 (gold "#c0965b") 106 (olive "#9cbd6f") 107 (slate "#76afbf") 108 (indigo "#9099d9") 109 (maroon "#cf7fa7") 110 (pink "#d09dc0") 111 112 ;;; Common accent backgrounds 113 114 (bg-red-intense "#9d1f1f") 115 (bg-green-intense "#2f822f") 116 (bg-yellow-intense "#7a6100") 117 (bg-blue-intense "#1640b0") 118 (bg-magenta-intense "#7030af") 119 (bg-cyan-intense "#2266ae") 120 121 (bg-red-subtle "#620f2a") 122 (bg-green-subtle "#00422a") 123 (bg-yellow-subtle "#4a4000") 124 (bg-blue-subtle "#242679") 125 (bg-magenta-subtle "#552f5f") 126 (bg-cyan-subtle "#004065") 127 128 (bg-red-nuanced "#350f14") 129 (bg-green-nuanced "#002718") 130 (bg-yellow-nuanced "#2c1f00") 131 (bg-blue-nuanced "#131c4d") 132 (bg-magenta-nuanced "#2f133f") 133 (bg-cyan-nuanced "#04253f") 134 135 ;;; Graphs 136 137 (bg-graph-red-0 "#b52c2c") 138 (bg-graph-red-1 "#702020") 139 (bg-graph-green-0 "#0fed00") 140 (bg-graph-green-1 "#007800") 141 (bg-graph-yellow-0 "#f1e00a") 142 (bg-graph-yellow-1 "#b08940") 143 (bg-graph-blue-0 "#2fafef") 144 (bg-graph-blue-1 "#1f2f8f") 145 (bg-graph-magenta-0 "#bf94fe") 146 (bg-graph-magenta-1 "#5f509f") 147 (bg-graph-cyan-0 "#47dfea") 148 (bg-graph-cyan-1 "#00808f") 149 150 ;;; Special purpose 151 152 (bg-completion "#483d8a") 153 (bg-hover "#45605e") 154 (bg-hover-secondary "#654a39") 155 (bg-hl-line "#303a6f") 156 (bg-region "#555a66") 157 (fg-region "#ffffff") 158 159 (bg-char-0 "#0050af") 160 (bg-char-1 "#7f1f7f") 161 (bg-char-2 "#625a00") 162 163 (bg-mode-line-active "#484d67") 164 (fg-mode-line-active "#ffffff") 165 (border-mode-line-active "#979797") 166 (bg-mode-line-inactive "#292d48") 167 (fg-mode-line-inactive "#969696") 168 (border-mode-line-inactive "#606270") 169 170 (modeline-err "#ffa9bf") 171 (modeline-warning "#dfcf43") 172 (modeline-info "#9fefff") 173 174 (bg-tab-bar "#2c3045") 175 (bg-tab-current "#0d0e1c") 176 (bg-tab-other "#4a4f6a") 177 178 ;;; Diffs 179 180 (bg-added "#003a2f") 181 (bg-added-faint "#002922") 182 (bg-added-refine "#035542") 183 (bg-added-fringe "#23884f") 184 (fg-added "#a0e0a0") 185 (fg-added-intense "#80e080") 186 187 (bg-changed "#363300") 188 (bg-changed-faint "#2a1f00") 189 (bg-changed-refine "#4a4a00") 190 (bg-changed-fringe "#8f7a30") 191 (fg-changed "#efef80") 192 (fg-changed-intense "#c0b05f") 193 194 (bg-removed "#4f1127") 195 (bg-removed-faint "#380a19") 196 (bg-removed-refine "#781a3a") 197 (bg-removed-fringe "#b81a26") 198 (fg-removed "#ffbfbf") 199 (fg-removed-intense "#ff9095") 200 201 (bg-diff-context "#1a1f30") 202 203 ;;; Uncommon accent backgrounds 204 205 (bg-ochre "#442c2f") 206 (bg-lavender "#38325c") 207 (bg-sage "#0f3d30") 208 209 ;;; Paren match 210 211 (bg-paren-match "#2f7f9f") 212 (bg-paren-expression "#453040") 213 (underline-paren-match unspecified) 214 215 ;;; Mappings 216 217 ;;;; General mappings 218 219 (fringe bg-dim) 220 (cursor magenta-warmer) 221 222 (keybind blue-cooler) 223 (name magenta) 224 (identifier yellow-faint) 225 226 (err red) 227 (warning yellow-warmer) 228 (info cyan-cooler) 229 230 (underline-err red-intense) 231 (underline-warning yellow) 232 (underline-note cyan) 233 234 (bg-prominent-err bg-red-intense) 235 (fg-prominent-err fg-main) 236 (bg-prominent-warning bg-yellow-intense) 237 (fg-prominent-warning fg-main) 238 (bg-prominent-note bg-cyan-intense) 239 (fg-prominent-note fg-main) 240 241 ;;;; Code mappings 242 243 (builtin magenta-warmer) 244 (comment red-faint) 245 (constant blue-cooler) 246 (docstring cyan-faint) 247 (docmarkup magenta-faint) 248 (fnname magenta) 249 (keyword magenta-cooler) 250 (preprocessor red-cooler) 251 (string blue-warmer) 252 (type cyan-cooler) 253 (variable cyan) 254 (rx-construct green-cooler) 255 (rx-backslash magenta) 256 257 ;;;; Accent mappings 258 259 (accent-0 blue-cooler) 260 (accent-1 magenta-warmer) 261 (accent-2 cyan-cooler) 262 (accent-3 yellow) 263 264 ;;;; Button mappings 265 266 (fg-button-active fg-main) 267 (fg-button-inactive fg-dim) 268 (bg-button-active bg-active) 269 (bg-button-inactive bg-dim) 270 271 ;;;; Completion mappings 272 273 (fg-completion-match-0 blue-cooler) 274 (fg-completion-match-1 magenta-warmer) 275 (fg-completion-match-2 cyan-cooler) 276 (fg-completion-match-3 yellow) 277 (bg-completion-match-0 unspecified) 278 (bg-completion-match-1 unspecified) 279 (bg-completion-match-2 unspecified) 280 (bg-completion-match-3 unspecified) 281 282 ;;;; Date mappings 283 284 (date-common cyan) 285 (date-deadline red) 286 (date-event fg-alt) 287 (date-holiday red-cooler) 288 (date-holiday-other blue) 289 (date-now fg-main) 290 (date-range fg-alt) 291 (date-scheduled yellow-warmer) 292 (date-weekday cyan) 293 (date-weekend red-faint) 294 295 ;;;; Line number mappings 296 297 (fg-line-number-inactive fg-dim) 298 (fg-line-number-active fg-main) 299 (bg-line-number-inactive bg-dim) 300 (bg-line-number-active bg-active) 301 302 ;;;; Link mappings 303 304 (fg-link blue-warmer) 305 (bg-link unspecified) 306 (underline-link blue-warmer) 307 308 (fg-link-symbolic cyan) 309 (bg-link-symbolic unspecified) 310 (underline-link-symbolic cyan) 311 312 (fg-link-visited magenta) 313 (bg-link-visited unspecified) 314 (underline-link-visited magenta) 315 316 ;;;; Mail mappings 317 318 (mail-cite-0 blue-warmer) 319 (mail-cite-1 yellow-cooler) 320 (mail-cite-2 cyan-cooler) 321 (mail-cite-3 red-cooler) 322 (mail-part blue) 323 (mail-recipient magenta-cooler) 324 (mail-subject magenta-warmer) 325 (mail-other magenta-faint) 326 327 ;;;; Mark mappings 328 329 (bg-mark-delete bg-red-subtle) 330 (fg-mark-delete red-cooler) 331 (bg-mark-select bg-cyan-subtle) 332 (fg-mark-select cyan) 333 (bg-mark-other bg-yellow-subtle) 334 (fg-mark-other yellow) 335 336 ;;;; Prompt mappings 337 338 (fg-prompt cyan-cooler) 339 (bg-prompt unspecified) 340 (bg-space-err bg-red-intense) 341 342 ;;;; Prose mappings 343 344 (prose-block fg-dim) 345 (prose-code cyan-cooler) 346 (prose-done green) 347 (prose-macro magenta-cooler) 348 (prose-metadata fg-dim) 349 (prose-metadata-value fg-alt) 350 (prose-table fg-alt) 351 (prose-tag magenta-faint) 352 (prose-todo red) 353 (prose-verbatim magenta-warmer) 354 355 ;;;; Rainbow mappings 356 357 (rainbow-0 fg-main) 358 (rainbow-1 magenta-intense) 359 (rainbow-2 cyan-intense) 360 (rainbow-3 red-warmer) 361 (rainbow-4 yellow-intense) 362 (rainbow-5 magenta-cooler) 363 (rainbow-6 green-intense) 364 (rainbow-7 blue-warmer) 365 (rainbow-8 magenta-warmer) 366 367 ;;;; Space mappings 368 369 (bg-space unspecified) 370 (fg-space border) 371 372 ;;;; Terminal mappings 373 374 (bg-term-black "black") 375 (fg-term-black "black") 376 (bg-term-black-bright "gray35") 377 (fg-term-black-bright "gray35") 378 379 (bg-term-red red) 380 (fg-term-red red) 381 (bg-term-red-bright red-warmer) 382 (fg-term-red-bright red-warmer) 383 384 (bg-term-green green) 385 (fg-term-green green) 386 (bg-term-green-bright green-cooler) 387 (fg-term-green-bright green-cooler) 388 389 (bg-term-yellow yellow) 390 (fg-term-yellow yellow) 391 (bg-term-yellow-bright yellow-warmer) 392 (fg-term-yellow-bright yellow-warmer) 393 394 (bg-term-blue blue) 395 (fg-term-blue blue) 396 (bg-term-blue-bright blue-warmer) 397 (fg-term-blue-bright blue-warmer) 398 399 (bg-term-magenta magenta) 400 (fg-term-magenta magenta) 401 (bg-term-magenta-bright magenta-cooler) 402 (fg-term-magenta-bright magenta-cooler) 403 404 (bg-term-cyan cyan) 405 (fg-term-cyan cyan) 406 (bg-term-cyan-bright cyan-cooler) 407 (fg-term-cyan-bright cyan-cooler) 408 409 (bg-term-white "gray65") 410 (fg-term-white "gray65") 411 (bg-term-white-bright "white") 412 (fg-term-white-bright "white") 413 414 ;;;; Heading mappings 415 416 (fg-heading-0 cyan-cooler) 417 (fg-heading-1 fg-main) 418 (fg-heading-2 yellow-faint) 419 (fg-heading-3 blue-faint) 420 (fg-heading-4 magenta) 421 (fg-heading-5 green-faint) 422 (fg-heading-6 red-faint) 423 (fg-heading-7 cyan-faint) 424 (fg-heading-8 fg-dim) 425 426 (bg-heading-0 unspecified) 427 (bg-heading-1 unspecified) 428 (bg-heading-2 unspecified) 429 (bg-heading-3 unspecified) 430 (bg-heading-4 unspecified) 431 (bg-heading-5 unspecified) 432 (bg-heading-6 unspecified) 433 (bg-heading-7 unspecified) 434 (bg-heading-8 unspecified) 435 436 (overline-heading-0 unspecified) 437 (overline-heading-1 unspecified) 438 (overline-heading-2 unspecified) 439 (overline-heading-3 unspecified) 440 (overline-heading-4 unspecified) 441 (overline-heading-5 unspecified) 442 (overline-heading-6 unspecified) 443 (overline-heading-7 unspecified) 444 (overline-heading-8 unspecified)) 445 "The entire palette of the `modus-vivendi-tinted' theme. 446 447 Named colors have the form (COLOR-NAME HEX-VALUE) with the former 448 as a symbol and the latter as a string. 449 450 Semantic color mappings have the form (MAPPING-NAME COLOR-NAME) 451 with both as symbols. The latter is a named color that already 452 exists in the palette and is associated with a HEX-VALUE.") 453 454 (defcustom modus-vivendi-tinted-palette-overrides nil 455 "Overrides for `modus-vivendi-tinted-palette'. 456 457 Mirror the elements of the aforementioned palette, overriding 458 their value. 459 460 For overrides that are shared across all of the Modus themes, 461 refer to `modus-themes-common-palette-overrides'. 462 463 Theme-specific overrides take precedence over shared overrides. 464 The idea of common overrides is to change semantic color 465 mappings, such as to make the cursor red. Wherea theme-specific 466 overrides can also be used to change the value of a named color, 467 such as what hexadecimal RGB value the red-warmer symbol 468 represents." 469 :group 'modus-themes 470 :package-version '(modus-themes . "4.0.0") 471 :version "30.1" 472 :type '(repeat (list symbol (choice symbol string))) 473 :set #'modus-themes--set-option 474 :initialize #'custom-initialize-default 475 :link '(info-link "(modus-themes) Palette overrides")) 476 477 (modus-themes-theme modus-vivendi-tinted 478 modus-vivendi-tinted-palette 479 modus-vivendi-tinted-palette-overrides) 480 481 (provide-theme 'modus-vivendi-tinted)) 482 483 ;;; modus-vivendi-tinted-theme.el ends here