mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
Compare commits
271 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1ad6c9383 | ||
|
|
d7e30694cb | ||
|
|
bcf065b803 | ||
|
|
a3e7ba2805 | ||
|
|
fd124dc370 | ||
|
|
24e4b4b9e4 | ||
|
|
2bae09feeb | ||
|
|
0f4d27dd96 | ||
|
|
27a0ed0260 | ||
|
|
9a3cd56cc2 | ||
|
|
b86cace435 | ||
|
|
21ffe0cd5a | ||
|
|
75ad377135 | ||
|
|
8ebcedea65 | ||
|
|
887af1139e | ||
|
|
52d4665bc5 | ||
|
|
75aa3fa79e | ||
|
|
940249694c | ||
|
|
7d53a6959c | ||
|
|
e81c3c6ce3 | ||
|
|
47dc463561 | ||
|
|
50b7a66423 | ||
|
|
9a46f89607 | ||
|
|
3c98eadc35 | ||
|
|
4bd5e91ee0 | ||
|
|
f2b88b4d7f | ||
|
|
a1d081256e | ||
|
|
0cf5a2a52a | ||
|
|
bf69c6cbcc | ||
|
|
35586477b1 | ||
|
|
31e8394cb1 | ||
|
|
21d97d4fe6 | ||
|
|
89294a9a6f | ||
|
|
f237b3ec47 | ||
|
|
61b5e30bb8 | ||
|
|
b3bd04aca5 | ||
|
|
a69a3c80b6 | ||
|
|
89e40be4d8 | ||
|
|
a071a9d8e7 | ||
|
|
a378446107 | ||
|
|
9172a0e8ef | ||
|
|
f28a5e5931 | ||
|
|
50c42fe90d | ||
|
|
c981ca60ae | ||
|
|
c6a08aa1a8 | ||
|
|
2d044ac89f | ||
|
|
f97a9b0240 | ||
|
|
ef2fa82b12 | ||
|
|
87d5764ecc | ||
|
|
c115002430 | ||
|
|
a47ed7af3f | ||
|
|
124ba3168e | ||
|
|
c6bb5eb8df | ||
|
|
a4b6ada971 | ||
|
|
634dcc3245 | ||
|
|
c8925cd23b | ||
|
|
b242d43e6a | ||
|
|
b4eca2c241 | ||
|
|
806c894611 | ||
|
|
02a339ab2d | ||
|
|
c2be0f59b5 | ||
|
|
211a72b708 | ||
|
|
b7f64effe5 | ||
|
|
7c3c48b6dd | ||
|
|
1fc28ad804 | ||
|
|
3ab7b22105 | ||
|
|
7f146f8826 | ||
|
|
5efd13653a | ||
|
|
34c169a780 | ||
|
|
010ed94527 | ||
|
|
0164619a09 | ||
|
|
8ebdc208ae | ||
|
|
2156e94a40 | ||
|
|
15c77ce939 | ||
|
|
0775c7ee92 | ||
|
|
c9c0974747 | ||
|
|
cf0044518f | ||
|
|
8d62a73f2a | ||
|
|
4b286c2b61 | ||
|
|
488e913b1e | ||
|
|
f71db69bad | ||
|
|
7c2ce1ff0d | ||
|
|
7950791b52 | ||
|
|
195011352e | ||
|
|
a2c40a9f92 | ||
|
|
657fd6f92d | ||
|
|
9e87779b5e | ||
|
|
ea87862946 | ||
|
|
8635304365 | ||
|
|
ef4197d5ae | ||
|
|
51c89ec604 | ||
|
|
4ca21529ae | ||
|
|
704edc5af3 | ||
|
|
551f4254c8 | ||
|
|
44cc370313 | ||
|
|
f90869584a | ||
|
|
742054c713 | ||
|
|
0217c0dde5 | ||
|
|
8a8ed85ae7 | ||
|
|
d2f64a8a4f | ||
|
|
f430f287bd | ||
|
|
ec4c79c472 | ||
|
|
087b419503 | ||
|
|
d76bbf9865 | ||
|
|
dce91510b3 | ||
|
|
df74b73a60 | ||
|
|
282dbd66b5 | ||
|
|
b31966fe65 | ||
|
|
c63be80d3b | ||
|
|
953ec93841 | ||
|
|
f062c8d99a | ||
|
|
a134889772 | ||
|
|
2e19f038c3 | ||
|
|
6fa9f61f48 | ||
|
|
dbd67e1140 | ||
|
|
937ee8047b | ||
|
|
7d234fd65f | ||
|
|
b07a5d5001 | ||
|
|
9492b9e3fa | ||
|
|
0a6f5d33a3 | ||
|
|
d763988f80 | ||
|
|
84528d1f3e | ||
|
|
5e69da089a | ||
|
|
bbb43a6f62 | ||
|
|
e0f42f2740 | ||
|
|
e5fb7f2229 | ||
|
|
83501bcd50 | ||
|
|
5e1621d638 | ||
|
|
c865abc82d | ||
|
|
30cbfe27b5 | ||
|
|
6beea7125e | ||
|
|
100533ab0f | ||
|
|
a4264088b7 | ||
|
|
ed36e34132 | ||
|
|
cb20bbe83f | ||
|
|
9d0226961d | ||
|
|
789cb7ea32 | ||
|
|
b45b0d8a7c | ||
|
|
ecd696daf8 | ||
|
|
b2e0aff5ed | ||
|
|
1343ea9947 | ||
|
|
122d53333f | ||
|
|
127ed57f0e | ||
|
|
9dd3b9074b | ||
|
|
9af856fb38 | ||
|
|
c475454d87 | ||
|
|
0ace30e471 | ||
|
|
b633768b7c | ||
|
|
ea135519d3 | ||
|
|
27456c3121 | ||
|
|
2c225b634e | ||
|
|
4ecefd924f | ||
|
|
4b4fd65336 | ||
|
|
39682cd87c | ||
|
|
ba747a245f | ||
|
|
0f6ce4f8bb | ||
|
|
c57f158886 | ||
|
|
55be658ddf | ||
|
|
8a45a1393a | ||
|
|
4d9a19513d | ||
|
|
192b2f612e | ||
|
|
0b6956a783 | ||
|
|
073e1d2488 | ||
|
|
afe5c14f30 | ||
|
|
8f05f03bc9 | ||
|
|
e22df9248c | ||
|
|
be8111f267 | ||
|
|
7eeadab5d8 | ||
|
|
e438a2fcdc | ||
|
|
b38aaf265f | ||
|
|
f5df8edd15 | ||
|
|
e8dee25bd6 | ||
|
|
53fa9fd23d | ||
|
|
3247c5d0f7 | ||
|
|
d1a9fbb4e6 | ||
|
|
5b4747748e | ||
|
|
d1037f1322 | ||
|
|
fc20e2bf7a | ||
|
|
89185784ea | ||
|
|
6dcd369037 | ||
|
|
cd01e5ead6 | ||
|
|
d673df22ca | ||
|
|
46d4b49266 | ||
|
|
7a86cf49a8 | ||
|
|
4ac7fdd6c7 | ||
|
|
c8a6aa6998 | ||
|
|
03c716e5bb | ||
|
|
cb99f74bc9 | ||
|
|
0358a2a460 | ||
|
|
83670578ea | ||
|
|
e1154773ce | ||
|
|
9649a18f69 | ||
|
|
64735b7df0 | ||
|
|
703dad8fd1 | ||
|
|
582f53b07b | ||
|
|
175a519494 | ||
|
|
53f461b397 | ||
|
|
725bf50aba | ||
|
|
bf9dfed400 | ||
|
|
7d06212953 | ||
|
|
3cc6f7fec2 | ||
|
|
2c901c9969 | ||
|
|
c41281151f | ||
|
|
b238abe7fc | ||
|
|
bcaf0835fd | ||
|
|
117875cb12 | ||
|
|
2a32f92782 | ||
|
|
7076680932 | ||
|
|
344946ac0e | ||
|
|
f4474129e6 | ||
|
|
1ee7c20971 | ||
|
|
ffdee3a436 | ||
|
|
fdcbb99be2 | ||
|
|
6fc7630666 | ||
|
|
fc3783e5d3 | ||
|
|
dbbfff6582 | ||
|
|
0958eb8e48 | ||
|
|
1129cf5f92 | ||
|
|
ecfd90d430 | ||
|
|
7bfc18d130 | ||
|
|
3b0bbaa779 | ||
|
|
01080b292b | ||
|
|
1d0348fc64 | ||
|
|
c2cf943239 | ||
|
|
d0f1537f95 | ||
|
|
1a346f825b | ||
|
|
7f5e40060a | ||
|
|
a8583fae4e | ||
|
|
cf8cc86afc | ||
|
|
b48837de67 | ||
|
|
0088add0ad | ||
|
|
e49b1e0248 | ||
|
|
c15eea4125 | ||
|
|
80db306ddb | ||
|
|
ec8f8a80b1 | ||
|
|
4694dc5a8b | ||
|
|
78e79d3eba | ||
|
|
2c85a495cb | ||
|
|
24d426e59b | ||
|
|
ed618c1050 | ||
|
|
51dd0362b9 | ||
|
|
1a7867074e | ||
|
|
feecb71130 | ||
|
|
0730b28045 | ||
|
|
a416bc4906 | ||
|
|
823d31d19b | ||
|
|
72bf76eb84 | ||
|
|
ef3e513dfe | ||
|
|
5af03b7294 | ||
|
|
23e443a016 | ||
|
|
a472f54645 | ||
|
|
c270cd8f5e | ||
|
|
26d60d3e6b | ||
|
|
53717d1607 | ||
|
|
81862dfa99 | ||
|
|
065fbe15e7 | ||
|
|
2602e2c0db | ||
|
|
3ddb82b37b | ||
|
|
f79684961e | ||
|
|
88fca8fd42 | ||
|
|
b9eb16d1a1 | ||
|
|
e08fb8adcd | ||
|
|
bb548f6564 | ||
|
|
3058909617 | ||
|
|
ee27621ce8 | ||
|
|
0e3b21ef87 | ||
|
|
0cd0b3cc7b | ||
|
|
3b0850883a | ||
|
|
c94938ff79 | ||
|
|
4c6a73dc71 | ||
|
|
d46e782510 |
496
CHANGELOG.org
496
CHANGELOG.org
|
|
@ -1,5 +1,5 @@
|
|||
#+TITLE: Change log of the Modus Themes for GNU Emacs
|
||||
#+AUTHOR: Protesilaos Stavrou
|
||||
#+AUTHOR: Protesilaos
|
||||
#+EMAIL: info@protesilaos.com
|
||||
#+OPTIONS: ':nil toc:nil num:nil author:nil email:nil
|
||||
|
||||
|
|
@ -15,6 +15,450 @@ For further details, please consult these additional resources:
|
|||
+ Manual :: <https://protesilaos.com/emacs/modus-themes>
|
||||
+ Screenshots :: <https://protesilaos.com/emacs/modus-themes-pictures>
|
||||
|
||||
* 5.3.0 on 2026-06-21
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:b4fa17a7-77a3-4e54-9af8-6a413b6b4e7c
|
||||
:END:
|
||||
|
||||
The Modus themes are in a stable state. To my mind, they provide the
|
||||
best "default theme" experience across the 40+ original themes I have
|
||||
carefully designed.
|
||||
|
||||
Modus is also a platform for making themes for Emacs. There are plenty
|
||||
of derivatives already. I am linking to them through the project's
|
||||
README.md and am always happy to mention more packages---just let me
|
||||
know.
|
||||
|
||||
This version does not include many user-facing changes. Most of my
|
||||
work focused on making internal refinements.
|
||||
|
||||
** Load the themes through the =early-init.el=
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:4d80aeaa-e93f-4cca-a2b2-792700081ead
|
||||
:END:
|
||||
|
||||
The Modus themes can now be loaded through the =early-init.el= file.
|
||||
The idea is to avoid the flash of light that occurs under certain
|
||||
conditions during startup.
|
||||
|
||||
This feature is the result of several changes to helper functions,
|
||||
especially those contributing to the ~modus-themes-generate-palette~
|
||||
function that Modus derivatives may be relying on.
|
||||
|
||||
Thanks to Steven Allen for an intermediate refinement in pull request
|
||||
194 and to Mike Olson for another relevant tweak in pull request 199:
|
||||
|
||||
- <https://github.com/protesilaos/modus-themes/pull/194>
|
||||
- <https://github.com/protesilaos/modus-themes/pull/199>
|
||||
|
||||
Steven's contribution no longer exists in the code base due to other
|
||||
changes I made, but was still useful at the time.
|
||||
|
||||
Both changes are small, meaning that their authors do not need to
|
||||
assign copyright to the Free Software Foundation.
|
||||
|
||||
Also thanks to Jacod "Jake" Gordon for reminding me to apply one of
|
||||
the new functions to the ~org-habit~ faces. This was done in issue
|
||||
197: <https://github.com/protesilaos/modus-themes/issues/197>.
|
||||
|
||||
** The underline for widget fields has the correct colour
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:c936a591-25ff-440d-88e8-e710da2c3f59
|
||||
:END:
|
||||
|
||||
Relevant faces use the palette entry for =border= (invoke the command
|
||||
~modus-themes-preview-colors~ or ~modus-themes-preview-colors-current~
|
||||
to view the entries in a theme's palette).
|
||||
|
||||
A popular package that makes use of =widget.el= widgets is ~notmuch~.
|
||||
|
||||
Thanks to ukiran03 for the contribution, which was done in pull
|
||||
request 193: <https://github.com/protesilaos/modus-themes/pull/193>.
|
||||
The change is small, meaning that ukiran03 does not need to assign
|
||||
copyright to the Free Software Foundation.
|
||||
|
||||
** A palette can now have a =bg-popup= entry
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:bb9166ae-2424-4edf-8004-91e99ff8555a
|
||||
:END:
|
||||
|
||||
This gives users and derivative themes the option to pick a suitable
|
||||
value for popup interfaces, such as those of the ~company~ and ~corfu~
|
||||
packages.
|
||||
|
||||
Thanks to aikrahguzar for making this suggestion in issue 70 of my
|
||||
~ef-themes~ repository (the ~ef-themes~ are built on top of the
|
||||
~modus-themes~ since Modus version =5.0.0=, Ef version =2.0.0=):
|
||||
<https://github.com/protesilaos/ef-themes/issues/70>.
|
||||
|
||||
** Support for faces or packages
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:cb1de864-f749-46e6-a8c4-1b5c47a59aff
|
||||
:END:
|
||||
|
||||
- ~lin~ by Protesilaos.
|
||||
- ~pulsar~ by Protesilaos.
|
||||
- ~institution-calendar~ by Protesilaos.
|
||||
- ~markdown-ts-mode~ by Rahul Martim Juliato and Stéphane Marks.
|
||||
- ~trust-manager~ by Eshel Yaron.
|
||||
- ~typst-ts-mode~ by Ziqi Yang. Thanks to Pranshu Sharma for
|
||||
suggesting its inclusion in issue 208:
|
||||
<https://github.com/protesilaos/modus-themes/issues/208>.
|
||||
- new ~elfeed~ faces since the maintenance of the project was assumed
|
||||
by Daniel Mendler, Karthik Chikmagalur, and Ihor Radchenko. To this
|
||||
end, thanks to Steven Allen for pull request 217 that added the
|
||||
=elfeed-show-*= faces: <https://github.com/protesilaos/modus-themes/pull/217>
|
||||
|
||||
** Internal refinements to the ~modus-themes-with-colors~ macro
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:36d438e6-2779-4e34-b9ae-bb26503643ed
|
||||
:END:
|
||||
|
||||
It now correctly handles the order of default palette colours and
|
||||
user-defined palette overrides. Thanks to JD Smith for the
|
||||
contribution in pull request 191: <https://github.com/protesilaos/modus-themes/pull/191>.
|
||||
|
||||
The change is small, meaning that JD does not need to assign copyright
|
||||
to the Free Software Foundation.
|
||||
|
||||
** The ~multiple-cursors~ are fine even when a bar is used
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:d707af16-66c9-4520-bd96-129e7b0511dd
|
||||
:END:
|
||||
|
||||
When the ~cursor-type~ is configured to be a =bar=, the fake cursors
|
||||
produced by the ~multiple-cursors~ package will still look right.
|
||||
Thanks to Elias Gabriel Perez for the change to the
|
||||
~mc/cursor-bar-face~ in pull request 213: <https://github.com/protesilaos/modus-themes/pull/213>.
|
||||
|
||||
** The ~blink-matching-paren-offscreen~ is the same as ~show-paren-match~
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:025061cd-ebdf-47bd-a596-9e8e9d6afa7d
|
||||
:END:
|
||||
|
||||
This is for thematic consistency. Thanks to Troy Brown for suggesting
|
||||
this change in issue 209: <https://github.com/protesilaos/modus-themes/issues/209>.
|
||||
|
||||
** Get ~vc-annotate~ look right
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:73e5911d-fe08-43b4-b3d9-e5a79af447b0
|
||||
:END:
|
||||
|
||||
The built-in ~vc-annotate~ command relies on a user option to read
|
||||
color values. We cannot handle this nicely at the theme level. Users
|
||||
need to write their own configuration like this:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my-modus-vc-annotate (&rest _)
|
||||
(modus-themes-with-colors
|
||||
(setq vc-annotate-background-mode nil)
|
||||
(setq vc-annotate-very-old-color fg-dim)
|
||||
(setq vc-annotate-color-map
|
||||
`(( 20. . ,red)
|
||||
( 40. . ,red-cooler)
|
||||
( 60. . ,red-warmer)
|
||||
( 80. . ,yellow-warmer)
|
||||
(100. . ,yellow)
|
||||
(120. . ,yellow-cooler)
|
||||
(140. . ,green-warmer)
|
||||
(160. . ,green)
|
||||
(180. . ,green-cooler)
|
||||
(200. . ,cyan-cooler)
|
||||
(220. . ,cyan-warmer)
|
||||
(240. . ,cyan)
|
||||
(260. . ,blue-warmer)
|
||||
(280. . ,blue)
|
||||
(300. . ,blue-cooler)
|
||||
(320. . ,blue-intense)
|
||||
(340. . ,magenta-cooler)
|
||||
(360. . ,fg-dim)))))
|
||||
|
||||
(with-eval-after-load 'vc-annotate
|
||||
(my-modus-vc-annotate)
|
||||
(add-hook 'enable-theme-functions #'my-modus-vc-annotate))
|
||||
#+end_src
|
||||
|
||||
[ The above code is relevant as of this writing. Though remember that
|
||||
I do not keep older publications up-to-date. The only source of
|
||||
truth is the manual of the Modus themes. ]
|
||||
|
||||
** Two old user options are no longer needed
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:39eb95f4-76b1-46b8-8f2e-245591c2ec03
|
||||
:END:
|
||||
|
||||
The user options ~modus-themes-completions~ and ~modus-themes-prompts~
|
||||
are obsolete. They used to be relevant before the introduction of
|
||||
palette overrides.
|
||||
|
||||
** Rewrote large parts of the manual
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:73703b3a-ef75-4cc0-97ca-344f8d6812ba
|
||||
:END:
|
||||
|
||||
I did it for clarity, but also to remove notes that were specific to
|
||||
older versions of Emacs.
|
||||
|
||||
** Many new ERT tests for the project
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:98134bb3-9eea-4fc2-9f21-bc619508de8a
|
||||
:END:
|
||||
|
||||
I have written many tests. They do not cover every single function,
|
||||
though the plan is to do that eventually. These tests are important to
|
||||
ensure that Modus is a solid platform for making derivative themes.
|
||||
|
||||
Much of this was done live: <https://protesilaos.com/codelog/2026-04-10-emacs-spontaneous-live-modus-themes/>.
|
||||
|
||||
Thanks to Benjamin Kästner for a couple of tweaks to a relevant macro
|
||||
in the tests' file. This was done in pull request 212, with further
|
||||
changes by me: <https://github.com/protesilaos/modus-themes/pull/212>.
|
||||
|
||||
** Links to projects related to Modus
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:50301743-a109-4d96-83dd-3b8c7c6b90ed
|
||||
:END:
|
||||
|
||||
In the README.md I now mention projects that are related to the Modus
|
||||
themes, such as derivative Emacs themes, but also ports for other
|
||||
editors.
|
||||
|
||||
There is also a link to my ~modus-themes-exporter~ package, which I
|
||||
developed during a live stream:
|
||||
|
||||
- <https://github.com/protesilaos/modus-themes-exporter>
|
||||
- <https://protesilaos.com/codelog/2026-04-13-emacs-live-develop-modus-themes-exporter-package/>
|
||||
|
||||
** Git commits
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:e869b1e6-5bc1-4d79-83cd-bb3f648c3ebf
|
||||
:END:
|
||||
|
||||
#+begin_src
|
||||
git shortlog 5.2.0..5.3.0 --summary --numbered
|
||||
123 Protesilaos
|
||||
2 Benjamin Kästner
|
||||
2 Steven Allen
|
||||
1 Elias Gabriel Perez
|
||||
1 JD Smith
|
||||
1 Mike Olson
|
||||
1 ukiran03
|
||||
#+end_src
|
||||
|
||||
* 5.2.0 on 2025-12-31
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:2c723b97-df07-4a3e-915f-b00f6647f74b
|
||||
:END:
|
||||
|
||||
This version fixes some bugs, adds a new feature for those who want to
|
||||
derive a theme from Modus, and makes other small quality-of-life
|
||||
refinements.
|
||||
|
||||
** The ~modus-themes-with-colors~ should work at all times
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:fcf14029-fd5f-4404-8ff7-370fb742c00d
|
||||
:END:
|
||||
|
||||
In the transition to version =5.0.0=, I inadvertently introduced
|
||||
regressions to the behaviour of the ~modus-themes-with-colors~ macro.
|
||||
This macro ~let~ binds the current theme's palette around arbitrary
|
||||
Elisp expressions, which allows users to access the named colours
|
||||
therein. In versions =5.0.0= and =5.1.0= the macro could not read
|
||||
variables defined outside its scope. Users needed to write an ~eval~
|
||||
around it, which I did not like. Now the macro should not require such
|
||||
workarounds: it basically is a ~let~ that should work as expected
|
||||
everywhere.
|
||||
|
||||
This was fixed over a series of Git commits related to issue 170:
|
||||
<https://github.com/protesilaos/modus-themes/issues/170>. Thanks to
|
||||
Alexandr Semenov and realazy for reporting the problems and testing my
|
||||
revisions.
|
||||
|
||||
** The ~modus-themes-generate-palette~ function to quickly get a palette
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:6786fe0c-3853-4586-89d6-4f60b3828b1c
|
||||
:END:
|
||||
|
||||
Users or package developers who want to create a theme on top of Modus
|
||||
can now get a kickstart by defining their palette with the help of the
|
||||
new ~modus-themes-generate-palette~ function. This function is meant
|
||||
to return a complete palette, given a list of basic colours. Users can
|
||||
thus experiment with their new theme while knowing that what they got
|
||||
contains all the definitions; definitions that they may then modify
|
||||
further (e.g. to define different semantic mappings than the defaults
|
||||
such as, for example, to have =(fg-heading-1 red-warmer)= instead of
|
||||
what originally is =(fg-heading-1 fg-main)=).
|
||||
|
||||
I have written extensive documentation in the manual, which includes a
|
||||
complete example of a Solarized theme that is built on top of Modus.
|
||||
If you have any questions, you are welcome to contact me.
|
||||
|
||||
** Convenience commands to select only dark or light themes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:deaebb75-129a-4ca2-8fd3-d29ae723474a
|
||||
:END:
|
||||
|
||||
The commands ~modus-themes-select-dark~ and ~modus-themes-select-light~
|
||||
use minibuffer completion to load a theme. The completion candidates
|
||||
are filtered to only dark or light themes, respectively.
|
||||
|
||||
This is effectively the same as calling the command ~modus-themes-select~
|
||||
with a prefix argument (=C-u= by default).
|
||||
|
||||
Remember that we also have the commands ~modus-themes-load-random~,
|
||||
~modus-themes-load-random-dark~, and ~modus-themes-load-random-light~.
|
||||
Otherwise use the command ~modus-themes-rotate~.
|
||||
|
||||
** Improved prompt for theme selection
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:fcfe5599-9d12-46cf-8896-e45625aa7304
|
||||
:END:
|
||||
|
||||
The minibuffer prompt used by the various Modus commands to select a
|
||||
theme now has a grouping function in place: it shows the current theme
|
||||
at the top and then all other themes grouped by their dark or light
|
||||
background. This makes it easier to find a relevant theme, especially
|
||||
if lots of them are present, such as when ~modus-themes-include-derivatives-mode~
|
||||
is enabled and relevant packages/themes are available (e.g. my
|
||||
~ef-themes~ and ~standard-themes~).
|
||||
|
||||
** Semantic colours for =transient.el= (e.g. in Magit)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:9bee92ab-e082-4f66-b01c-892860c60a0c
|
||||
:END:
|
||||
|
||||
The =transient.el= concept of "semantic colours" is now supported.
|
||||
This is used by default in Magit to denote the different types of
|
||||
keys, such as those that exit the transient, keep it active, move to
|
||||
another transient, and the like. Users who prefer the old style where
|
||||
all key bindings looked the same must customise the user option
|
||||
~transient-semantic-coloring~.
|
||||
|
||||
Note that the deuteranopia- and tritanopia- optimised themes adapt
|
||||
gracefully to such "semantics", owning to relevant internal
|
||||
refinements I made. Those themes cannot rely on the full colour
|
||||
spectrum to communicate such nuances.
|
||||
|
||||
** All ~hl-todo-mode~ faces use a bold weight if appropriate
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:309dd08f-dc01-47f6-8e88-0558181e1bb8
|
||||
:END:
|
||||
|
||||
When the user option ~modus-themes-bold-constructs~ is set to a
|
||||
non-~nil~ value, then all keywords that ~hl-todo-mode~ highlights will
|
||||
be rendered in a bold weight (technically, they inherit the ~bold~
|
||||
face). This is how we were doing it before until I undid it by
|
||||
mistake. Thanks to Dominik Schrempf for reporting the bug in issue
|
||||
177: <https://github.com/protesilaos/modus-themes/issues/177>.
|
||||
|
||||
** Theme-sensitive colours for Gnus mail groups
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:ea438d6c-2e3e-4427-86af-3d9590e260d3
|
||||
:END:
|
||||
|
||||
The Gnus mail groups no longer have hardcoded colour values. They will
|
||||
look different depending on the current Modus theme.
|
||||
|
||||
** Faces that set a =:box= attribute handle unspecified colours
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:98c4f263-81ad-4bb2-85fc-af30b32584a2
|
||||
:END:
|
||||
|
||||
I updated all faces that use a =:box= attribute to account for the
|
||||
scenario of a user writing palette overrides that unset the relevant
|
||||
colour. Thanks to JD Smith for reporting a bug along those lines in
|
||||
issue 9 of my ~standard-themes~ repository (they are derived from the
|
||||
~modus-themes~, hence the changes here):
|
||||
<https://github.com/protesilaos/standard-themes/issues/9>.
|
||||
|
||||
** The ~calendar-today~ and ~org-date-selected~ faces are disambiguated
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:c5c7ff66-0ed8-424c-8579-b84b776ad461
|
||||
:END:
|
||||
|
||||
These two faces are no longer using the same styles. This is because
|
||||
they can appear in the same buffer. Thanks to Rudolf Adamkovič for
|
||||
discussing this with me in the context of the same change for my
|
||||
~doric-themes~ (issue 20 in doric-themes.git):
|
||||
<https://github.com/protesilaos/doric-themes/issues/20>.
|
||||
|
||||
** The Modus "current theme" respects multiple enabled themes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:4c2abd1b-407a-4273-96d8-aba3bb42e0dc
|
||||
:END:
|
||||
|
||||
The Modus concept of "current theme" respects the user's choice for
|
||||
multiple themes loaded at once. It will return the first Modus theme
|
||||
even if it is not at the front of the list.
|
||||
|
||||
[ Emacs will load multiple themes by default, which leads to awkward
|
||||
colour combinations, unless you know what you are doing---as such all
|
||||
the Modus commands that load a theme will disable all others, subject
|
||||
to the user option ~modus-themes-disable-other-themes~. ]
|
||||
|
||||
Thanks to Pierre Téchoueyres for reporting the scenario where multiple
|
||||
other themes are loaded on top of a Modus theme. This was done in
|
||||
issue 182: <https://github.com/protesilaos/modus-themes/issues/182>.
|
||||
|
||||
Also thanks to Pierre for covering another snippet that I had missed.
|
||||
This was done in pull request 184:
|
||||
<https://github.com/protesilaos/modus-themes/pull/184>.
|
||||
|
||||
Pierre has assigned copyright to the Free Software Foundation.
|
||||
|
||||
** Fixed symbol of inherited AUCTeX face
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:4caebf48-2544-4367-ad35-61957f5f043b
|
||||
:END:
|
||||
|
||||
There was a typo which caused an error. Thanks to Rudolf Adamkovič for
|
||||
the patch and also for providing a relevant unit test. This was done
|
||||
in pull request 188: <https://github.com/protesilaos/modus-themes/pull/188>.
|
||||
|
||||
Rudolf has assigned copyright to the Free Software Foundation.
|
||||
|
||||
** Miscellaneous
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:738675ea-6f7b-47e5-907e-468b67ecd430
|
||||
:END:
|
||||
|
||||
- Thanks to Basil L. Contovounesios for simplifying a couple of
|
||||
expressions. This was done in pull request 190:
|
||||
<https://github.com/protesilaos/modus-themes/pull/190>. Basil has
|
||||
assigned copyright to the Free Software Foundation.
|
||||
|
||||
- The faces of the built-in ~completion-preview-mode~ are now
|
||||
supported. Thanks to Kevin Fleming for asking me about this in issue
|
||||
178: <https://github.com/protesilaos/modus-themes/issues/178>.
|
||||
|
||||
- Several faces that had a strike-through effect when they did not
|
||||
really need it are revised to use a wavy underline instead. The idea
|
||||
is to let the text be readable at all times, regardless of the
|
||||
effective font family. With the strike-through effect, some fonts
|
||||
completely obscure the underlying text.Thanks to Morgan Willcock for
|
||||
discussing with me the use of the strike-through style in issue 169:
|
||||
<https://github.com/protesilaos/modus-themes/issues/169>.
|
||||
|
||||
- All ~symbol-overlay~ faces are unique, fixing a mistake I had done
|
||||
before.
|
||||
|
||||
- The ~org-dispatcher-highlight~, which is used to highlight the keys
|
||||
of the Org export interface, now uses the appropriate foreground
|
||||
colour and is always rendered in a bold weight.
|
||||
|
||||
- The ~org-habit~ faces no longer call the function
|
||||
~readable-foreground-color~. This is because that function does not
|
||||
work if the theme is loaded via the =early-init.el=. Thanks to
|
||||
Gaston Cabotin for reporting the problem in issue 174:
|
||||
<https://github.com/protesilaos/modus-themes/issues/174>.
|
||||
|
||||
- The ~gnus-button~, which Gnus uses in all sorts of places to mark
|
||||
some text as clickable, is styled with a less intense underline and
|
||||
will no longer follow the style of links, including possible palette
|
||||
overrides. This way, Gnus article buffers will not have visual
|
||||
noise. Thanks to Morgan Willcock for discussing this with me in
|
||||
issue 140: <https://github.com/protesilaos/modus-themes/issues/140>.
|
||||
|
||||
* 5.1.0 on 2025-11-07
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:86a4b45a-14e0-45f1-9625-969ad966b9ff
|
||||
|
|
@ -3010,7 +3454,7 @@ users, while also catering to their aesthetic preferences.
|
|||
#+begin_src text
|
||||
Modus themes version 3.0.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-10-28
|
||||
By Protesilaos <info@protesilaos.com> on 2022-10-28
|
||||
|
||||
|
||||
The version that will ship with Emacs 29
|
||||
|
|
@ -3186,7 +3630,7 @@ Miscellaneous
|
|||
#+begin_src text
|
||||
Modus themes version 2.7.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-10-01
|
||||
By Protesilaos <info@protesilaos.com> on 2022-10-01
|
||||
|
||||
|
||||
Support for packages or faces
|
||||
|
|
@ -3363,7 +3807,7 @@ Changes to the manual
|
|||
#+begin_src text
|
||||
Modus themes version 2.6.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-08-19
|
||||
By Protesilaos <info@protesilaos.com> on 2022-08-19
|
||||
|
||||
|
||||
Changes to supported faces or face groups
|
||||
|
|
@ -3476,7 +3920,7 @@ Changes to the manual
|
|||
#+begin_src text
|
||||
Modus themes version 2.5.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-08-03
|
||||
By Protesilaos <info@protesilaos.com> on 2022-08-03
|
||||
|
||||
This entry documents the changes made to the project since the
|
||||
publication of version 2.4.0 on 2022-06-01. It spans more than 60
|
||||
|
|
@ -3903,7 +4347,7 @@ Miscellaneous
|
|||
#+begin_src text
|
||||
Modus themes version 2.4.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-06-01
|
||||
By Protesilaos <info@protesilaos.com> on 2022-06-01
|
||||
|
||||
This entry documents the changes made to the project since the
|
||||
publication of version 2.3.0 on 2022-04-01. It spans more than 60
|
||||
|
|
@ -4242,7 +4686,7 @@ Miscellaneous
|
|||
#+begin_src text
|
||||
Modus themes version 2.3.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-04-01
|
||||
By Protesilaos <info@protesilaos.com> on 2022-04-01
|
||||
|
||||
This entry documents the changes made to the project since the
|
||||
publication of version 2.2.0 on 2022-02-23. It spans more than 70
|
||||
|
|
@ -4308,7 +4752,7 @@ Attempted bug fix for byte compiled files
|
|||
Quoting from the git log:
|
||||
|
||||
commit f067d2ef39c22174b95584f2cba7942aaf03bcca
|
||||
Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
Author: Protesilaos <info@protesilaos.com>
|
||||
Date: Thu Mar 3 06:52:31 2022 +0200
|
||||
|
||||
Reify themes with eval-and-compile
|
||||
|
|
@ -4542,7 +4986,7 @@ Thanks once again to everyone involved!
|
|||
#+begin_src text
|
||||
Modus themes version 2.2.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-02-23
|
||||
By Protesilaos <info@protesilaos.com> on 2022-02-23
|
||||
|
||||
The present entry records the changes made to the project since the
|
||||
publication of version 2.1.0 on 2022-02-17. This spans about 10 commits
|
||||
|
|
@ -4652,7 +5096,7 @@ Miscellaneous changes
|
|||
#+begin_src text
|
||||
Modus themes version 2.1.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2022-02-17
|
||||
By Protesilaos <info@protesilaos.com> on 2022-02-17
|
||||
|
||||
The present entry records the changes made to the project since the
|
||||
publication of version 2.0.0 on 2021-12-24. There have been more than
|
||||
|
|
@ -5361,7 +5805,7 @@ intense work which further iterated on an already solid base.
|
|||
#+begin_src text
|
||||
Modus themes version 2.0.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-12-24
|
||||
By Protesilaos <info@protesilaos.com> on 2021-12-24
|
||||
|
||||
This entry covers the changes made to the project since the publication
|
||||
of version 1.7.0 on 2021-11-18. There have been more than 90 commits in
|
||||
|
|
@ -5743,7 +6187,7 @@ Miscellaneous
|
|||
#+begin_src text
|
||||
Modus themes version 1.7.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-11-18
|
||||
By Protesilaos <info@protesilaos.com> on 2021-11-18
|
||||
|
||||
The present entry records the changes made to the project since the
|
||||
release of version 1.6.0 on 2021-09-29. There have been more than 60
|
||||
|
|
@ -5976,7 +6420,7 @@ Thanks once again to everyone involved!
|
|||
#+begin_src text
|
||||
Modus themes version 1.6.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-09-29
|
||||
By Protesilaos <info@protesilaos.com> on 2021-09-29
|
||||
|
||||
This entry records the changes made to the project since the release of
|
||||
version 1.5.0 on 2021-07-15. There have been around 70 commits since
|
||||
|
|
@ -6329,7 +6773,7 @@ themes, version 1.6.0, as part of the next stable release of Emacs.
|
|||
#+begin_src text
|
||||
Modus themes version 1.5.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-07-15
|
||||
By Protesilaos <info@protesilaos.com> on 2021-07-15
|
||||
|
||||
This entry outlines the set of changes made to the project since the
|
||||
release of version 1.4.0 on 2021-05-25. There have been over 130
|
||||
|
|
@ -6770,7 +7214,7 @@ Thanks again to everyone involved!
|
|||
#+begin_src text
|
||||
Modus themes version 1.4.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-05-25
|
||||
By Protesilaos <info@protesilaos.com> on 2021-05-25
|
||||
|
||||
This entry records the changes made to the project since the release of
|
||||
version 1.3.0 on 2021-04-17. There have been around 100 commits in the
|
||||
|
|
@ -7089,7 +7533,7 @@ Miscellaneous
|
|||
#+begin_src text
|
||||
Modus themes version 1.3.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-04-17
|
||||
By Protesilaos <info@protesilaos.com> on 2021-04-17
|
||||
|
||||
This entry records the changes introduced to the project since the
|
||||
publication of version 1.2.0 (2021-03-04). There have been around 100
|
||||
|
|
@ -7458,7 +7902,7 @@ Thanks once again to everyone involved!
|
|||
#+begin_src text
|
||||
Modus themes version 1.2.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-03-04
|
||||
By Protesilaos <info@protesilaos.com> on 2021-03-04
|
||||
|
||||
This entry records the changes introduced to the project since the
|
||||
publication of version 1.1.0 (2021-01-24). There have been close to 100
|
||||
|
|
@ -7811,7 +8255,7 @@ Miscellaneous
|
|||
#+begin_src text
|
||||
Modus themes version 1.1.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2021-01-24
|
||||
By Protesilaos <info@protesilaos.com> on 2021-01-24
|
||||
|
||||
This entry records the changes introduced to the project since the
|
||||
publication of version 1.0.0 (2020-12-05). There have been around 150
|
||||
|
|
@ -8272,7 +8716,7 @@ terms of face coverage, and (iv) meticulously designed throughout.
|
|||
#+begin_src text
|
||||
Modus themes version 1.0.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-12-05
|
||||
By Protesilaos <info@protesilaos.com> on 2020-12-05
|
||||
|
||||
This entry documents the changes since version 0.13.0 (2020-10-08).
|
||||
They constitute a major release with backward-incompatible additions
|
||||
|
|
@ -8679,7 +9123,7 @@ it may have introduced.
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.13.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-10-08
|
||||
By Protesilaos <info@protesilaos.com> on 2020-10-08
|
||||
|
||||
This entry documents the changes since version 0.12.0 (2020-08-26).
|
||||
There have been around 150 commits in the meantime, making this the
|
||||
|
|
@ -9210,7 +9654,7 @@ Thanks again to everyone who helped improve the themes!
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.12.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-08-26
|
||||
By Protesilaos <info@protesilaos.com> on 2020-08-26
|
||||
|
||||
This entry documents the set of changes since version 0.11.0
|
||||
(2020-07-31). There have been around 70 commits in the meatime, though
|
||||
|
|
@ -9514,7 +9958,7 @@ their thoughts. The people already mentioned herein:
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.11.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-07-31
|
||||
By Protesilaos <info@protesilaos.com> on 2020-07-31
|
||||
|
||||
This entry records the changes since version 0.10.0 (2020-06-24). The
|
||||
present release covers close to 100 commits, some of which introduce
|
||||
|
|
@ -9778,7 +10222,7 @@ https://gitlab.com/protesilaos/modus-themes/-/issues
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.10.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-06-24
|
||||
By Protesilaos <info@protesilaos.com> on 2020-06-24
|
||||
|
||||
This entry records the changes since version 0.9.0 (2020-06-03). The
|
||||
present release is focused on stability and internal improvements.
|
||||
|
|
@ -9900,7 +10344,7 @@ My thanks to Basil and André for their contributions!
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.9.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-06-03
|
||||
By Protesilaos <info@protesilaos.com> on 2020-06-03
|
||||
|
||||
This entry records the changes since version 0.8.0 (2020-04-28). The
|
||||
present release contains about 50 commits, covering a month of active
|
||||
|
|
@ -10058,7 +10502,7 @@ Added support for
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.8.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-04-28
|
||||
By Protesilaos <info@protesilaos.com> on 2020-04-28
|
||||
|
||||
This entry records the changes since version 0.7.0 (2020-03-30). The
|
||||
present release contains a little more than a hundred commits, covering
|
||||
|
|
@ -10232,7 +10676,7 @@ Miscellaneous changes and concluding remarks
|
|||
#+begin_src text
|
||||
Modus Operandi and Modus Vivendi version 0.7.0
|
||||
|
||||
By Protesilaos Stavrou <info@protesilaos.com> on 2020-03-30
|
||||
By Protesilaos <info@protesilaos.com> on 2020-03-30
|
||||
|
||||
This entry documents the changes since version 0.6.0 (2020-03-01). The
|
||||
present release is the largest to date containing 110 commits.
|
||||
|
|
|
|||
49
README.md
49
README.md
|
|
@ -67,7 +67,8 @@ The manual has a section about building on top of Modus. My
|
|||
("C-<f5>" . modus-themes-select)
|
||||
("M-<f5>" . modus-themes-load-random))
|
||||
:config
|
||||
;; Your customizations here:
|
||||
;; Your customizations here. All customizations must evaluated
|
||||
;; BEFORE loading the theme.
|
||||
(setq modus-themes-to-toggle '(modus-operandi modus-vivendi)
|
||||
modus-themes-to-rotate modus-themes-items
|
||||
modus-themes-mixed-fonts t
|
||||
|
|
@ -88,3 +89,49 @@ The manual has a section about building on top of Modus. My
|
|||
;; `modus-themes-load-random-light').
|
||||
(modus-themes-load-theme 'modus-operandi))
|
||||
```
|
||||
|
||||
## Links to other projects
|
||||
|
||||
In this section I collect links to other themes built on top of Modus,
|
||||
have Modus as a dependency, or are porting Modus to some other
|
||||
platform. You are welcome to append your project to the relevant list.
|
||||
|
||||
In linking to these projects, I am not endorsing anybody's views.
|
||||
|
||||
### Emacs themes based on Modus
|
||||
|
||||
This is not an exhaustive list. You are welcome to add your package
|
||||
here. Newer projects are at the bottom and are added as I am made
|
||||
aware of them.
|
||||
|
||||
- `ef-themes` by Protesilaos <https://github.com/protesilaos/ef-themes>
|
||||
- `standard-themes` by Protesilaos <https://github.com/protesilaos/standard-themes>
|
||||
- `modus-ewal-theme` by Oliwier Czerwiński <https://github.com/deadendpl/modus-ewal-theme>
|
||||
- `modus-flexoki` by Derek Passen <https://github.com/dpassen/modus-flexoki>
|
||||
- `faff-theme` (since version 4) by James Ferguson <https://github.com/WJCFerguson/emacs-faff-theme>
|
||||
- `modus-catpuccin` by Magnus Therning <https://gitlab.com/magus/modus-catppuccin>
|
||||
- `pixel-themes` by Lucas <https://github.com/lucasobx/pixel-themes>
|
||||
- `modus-nordic` (`modus-nordic-night` and `modus-nordic-midnight`) by Ashton Wiersdorf <https://codeberg.org/ashton314/modus-nordic-night>
|
||||
- `folio-theme` by kn66 (nobu43) <https://github.com/kn66/folio-theme.el>
|
||||
- `modus-alabaster` by Derek Passen <https://github.com/dpassen/modus-alabaster>
|
||||
- `modus-vague` by Ashish Panigrahi <https://github.com/paniash/modus-vague.git>
|
||||
- `peppers-theme` by Joar von Arndt <https://codeberg.org/joar/peppers-theme>
|
||||
|
||||
### Other Emacs packages based on Modus
|
||||
|
||||
- `modus-themes-exporter` by Protesilaos <https://github.com/protesilaos/modus-themes-exporter>
|
||||
|
||||
### Projects inspired by the Modus themes
|
||||
|
||||
This is not an exhaustive list. You are welcome to add your project here.
|
||||
|
||||
- `hugo-modus` by Yejun Su is a theme for the Hugo static site
|
||||
generator: <https://github.com/goofansu/hugo-modus>. It uses colours
|
||||
from the Modus themes.
|
||||
- `modus-themes.nvim` by Miika Nissi and others is a port for NeoVim:
|
||||
<https://github.com/miikanissi/modus-themes.nvim>.
|
||||
- `zed-modus-themes` by Vitaly Slobodin is a port for the Zed editor:
|
||||
<https://github.com/vitallium/zed-modus-themes>.
|
||||
- `word-smith` by Sadsnake1 is a distraction-free writing for Obsidian
|
||||
that includes ports of the Modus themes: <https://github.com/Sadsnake1/word-smith>
|
||||
- `omarchy-modus-themes` by Dhavan Vaidya: <https://github.com/codingquark/omarchy-modus-themes>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
2583
doc/modus-themes.org
2583
doc/modus-themes.org
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-operandi-deuteranopia-theme.el --- Deuteranopia-optimized theme with a white background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,6 +87,9 @@ standard)."
|
|||
'light
|
||||
'modus-themes-operandi-deuteranopia-palette
|
||||
'modus-operandi-deuteranopia-palette-user
|
||||
'modus-operandi-deuteranopia-palette-overrides)
|
||||
'modus-operandi-deuteranopia-palette-overrides
|
||||
'modus-themes-faces-deuteranopia)
|
||||
|
||||
(provide 'modus-operandi-deuteranopia-theme)
|
||||
|
||||
;;; modus-operandi-deuteranopia-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-operandi-theme.el --- Elegant, highly legible theme with a white background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,4 +87,6 @@ which corresponds to a minimum contrast in relative luminance of
|
|||
'modus-operandi-palette-user
|
||||
'modus-operandi-palette-overrides)
|
||||
|
||||
(provide 'modus-operandi-theme)
|
||||
|
||||
;;; modus-operandi-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-operandi-tinted-theme.el --- Elegant, highly legible theme with a light ochre background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,4 +87,6 @@ which corresponds to a minimum contrast in relative luminance of
|
|||
'modus-operandi-tinted-palette-user
|
||||
'modus-operandi-tinted-palette-overrides)
|
||||
|
||||
(provide 'modus-operandi-tinted-theme)
|
||||
|
||||
;;; modus-operandi-tinted-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-operandi-tritanopia-theme.el --- Tritanopia-optimized theme with a white background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,6 +87,9 @@ standard)."
|
|||
'light
|
||||
'modus-themes-operandi-tritanopia-palette
|
||||
'modus-operandi-tritanopia-palette-user
|
||||
'modus-operandi-tritanopia-palette-overrides)
|
||||
'modus-operandi-tritanopia-palette-overrides
|
||||
'modus-themes-faces-tritanopia)
|
||||
|
||||
(provide 'modus-operandi-tritanopia-theme)
|
||||
|
||||
;;; modus-operandi-tritanopia-theme.el ends here
|
||||
|
|
|
|||
1658
modus-themes.el
1658
modus-themes.el
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-vivendi-deuteranopia-theme.el --- Deuteranopia-optimized theme with a black background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,6 +87,9 @@ standard)."
|
|||
'dark
|
||||
'modus-themes-vivendi-deuteranopia-palette
|
||||
'modus-vivendi-deuteranopia-palette-user
|
||||
'modus-vivendi-deuteranopia-palette-overrides)
|
||||
'modus-vivendi-deuteranopia-palette-overrides
|
||||
'modus-themes-faces-deuteranopia)
|
||||
|
||||
(provide 'modus-vivendi-deuteranopia-theme)
|
||||
|
||||
;;; modus-vivendi-deuteranopia-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-vivendi-theme.el --- Elegant, highly legible theme with a black background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,4 +87,6 @@ which corresponds to a minimum contrast in relative luminance of
|
|||
'modus-vivendi-palette-user
|
||||
'modus-vivendi-palette-overrides)
|
||||
|
||||
(provide 'modus-vivendi-theme)
|
||||
|
||||
;;; modus-vivendi-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-vivendi-tinted-theme.el --- Elegant, highly legible theme with a night sky background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,4 +87,6 @@ which corresponds to a minimum contrast in relative luminance of
|
|||
'modus-vivendi-tinted-palette-user
|
||||
'modus-vivendi-tinted-palette-overrides)
|
||||
|
||||
(provide 'modus-vivendi-tinted-theme)
|
||||
|
||||
;;; modus-vivendi-tinted-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; modus-vivendi-tritanopia-theme.el --- Tritanopia-optimized theme with a black background -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2019-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; Author: Protesilaos <info@protesilaos.com>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
|
@ -87,6 +87,9 @@ standard)."
|
|||
'dark
|
||||
'modus-themes-vivendi-tritanopia-palette
|
||||
'modus-vivendi-tritanopia-palette-user
|
||||
'modus-vivendi-tritanopia-palette-overrides)
|
||||
'modus-vivendi-tritanopia-palette-overrides
|
||||
'modus-themes-faces-tritanopia)
|
||||
|
||||
(provide 'modus-vivendi-tritanopia-theme)
|
||||
|
||||
;;; modus-vivendi-tritanopia-theme.el ends here
|
||||
|
|
|
|||
372
tests/modus-themes-test.el
Normal file
372
tests/modus-themes-test.el
Normal file
|
|
@ -0,0 +1,372 @@
|
|||
;;; modus-themes-test.el --- Unit tests for the Modus themes -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2025-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Protesilaos <info@protesilaos.com>,
|
||||
;; Rudolf Adamkovič <rudolf@adamkovic.org>
|
||||
;; Maintainer: Protesilaos <info@protesilaos.com>
|
||||
;; URL: https://github.com/protesilaos/modus-themes
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
;; This program 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.
|
||||
;;
|
||||
;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Tests for the Modus themes. Note that we are using Shorthands in
|
||||
;; this file, so the "mtt-" prefix really is "modus-themes-test-".
|
||||
;; Evaluate the following to learn more:
|
||||
;;
|
||||
;; (info "(elisp) Shorthands")
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'ert)
|
||||
(require 'modus-themes)
|
||||
|
||||
(defmacro mtt-define-test (symbol &rest body)
|
||||
"Write test for SYMBOL with BODY forms.
|
||||
If the `car' of BODY is a string, use it as the docstring of the test.
|
||||
Else provide a generic snippet of text."
|
||||
(declare (doc-string 2) (indent defun))
|
||||
(let* ((first (car body))
|
||||
(has-docstring (stringp first))
|
||||
(docstring (if has-docstring
|
||||
first
|
||||
(format "Test that `%s' does the right thing." symbol)))
|
||||
(body (if has-docstring (cdr body) body)))
|
||||
`(ert-deftest ,(intern (format "mtt-%s" symbol)) ()
|
||||
,docstring
|
||||
,@body)))
|
||||
|
||||
(mtt-define-test modus-themes--color-hex-p
|
||||
(should (modus-themes--color-hex-p "#123"))
|
||||
(should (modus-themes--color-hex-p "#123456"))
|
||||
(should (modus-themes--color-hex-p "#abc"))
|
||||
(should (modus-themes--color-hex-p "#ABCDEF"))
|
||||
(should-not (modus-themes--color-hex-p "abc"))
|
||||
(should-not (modus-themes--color-hex-p "#abcd"))
|
||||
(should-not (modus-themes--color-hex-p "#12345"))
|
||||
(should-not (modus-themes--color-hex-p "#1234567"))
|
||||
(should-not (modus-themes--color-hex-p "#zzz"))
|
||||
(should-not (modus-themes--color-hex-p "#zzz"))
|
||||
(should-not (modus-themes--color-hex-p "#12g456")))
|
||||
|
||||
(mtt-define-test modus-themes--hex-or-name-to-rgb
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#fff") (list 1.0 1.0 1.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#000") (list 0.0 0.0 0.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#f00") (list 1.0 0.0 0.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#0f0") (list 0.0 1.0 0.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#00f") (list 0.0 0.0 1.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#ffffff") (list 1.0 1.0 1.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#000000") (list 0.0 0.0 0.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#ff0000") (list 1.0 0.0 0.0)))
|
||||
(should (equal (modus-themes--hex-or-name-to-rgb "#00ff00") (list 0.0 1.0 0.0)))
|
||||
;; NOTE 2026-04-12: I do not need it to be precise here, hence the `format'.
|
||||
(let ((rgb-rounded-fn
|
||||
(lambda (hex)
|
||||
(let ((rgb (modus-themes--hex-or-name-to-rgb hex)))
|
||||
(mapcar (lambda (float) (string-to-number (format "%.2f" float))) rgb)))))
|
||||
(should (equal (funcall rgb-rounded-fn "#800000") (list 0.5 0.0 0.0)))
|
||||
(should (equal (funcall rgb-rounded-fn "#008000") (list 0.0 0.5 0.0)))
|
||||
(should (equal (funcall rgb-rounded-fn "#000080") (list 0.0 0.0 0.5))))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb ""))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb "#"))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb "#1"))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb "#12"))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb "#1234"))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb "#12345"))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb "#gggggg"))
|
||||
(should-error (modus-themes--hex-or-name-to-rgb (list 1.0 1.0 1.0))))
|
||||
|
||||
(mtt-define-test modus-themes-wcag-formula
|
||||
"Test that `modus-themes-wcag-formula' does the right thing.
|
||||
Also see `modus-themes-test--modus-themes--hex-to-rgb'."
|
||||
(should (= (modus-themes-wcag-formula "#ffffff") 1.0))
|
||||
(should (= (modus-themes-wcag-formula "#000000") 0.0))
|
||||
(should-error (modus-themes-wcag-formula "#00000")))
|
||||
|
||||
(mtt-define-test modus-themes-contrast
|
||||
"Test that `modus-themes-contrast' works as intended.
|
||||
Also see `modus-themes-test--modus-themes--hex-to-rgb'."
|
||||
(should (= (modus-themes-contrast "#ffffff" "#000000") 21.0))
|
||||
(should (= (modus-themes-contrast "#000000" "#ffffff") 21.0))
|
||||
;; NOTE 2026-04-12: I do not need it to be precise here, hence the `format'.
|
||||
(let ((float-2-fn (lambda (hex1 hex2) (string-to-number (format "%.2f" (modus-themes-contrast hex1 hex2))))))
|
||||
(should (= (funcall float-2-fn "#ff0000" "#ffffff") 4.0))
|
||||
(should (= (funcall float-2-fn "#00ff00" "#ffffff") 1.37))
|
||||
(should (= (funcall float-2-fn "#0000ff" "#ffffff") 8.59))
|
||||
(should (= (funcall float-2-fn "#ffff00" "#ffffff") 1.07))
|
||||
(should (= (funcall float-2-fn "#00ffff" "#ffffff") 1.25))
|
||||
(should (= (funcall float-2-fn "#ff00ff" "#ffffff") 3.14)))
|
||||
(should-error (modus-themes-contrast "#ffffff" "#00000"))
|
||||
(should-error (modus-themes-contrast "#fffff" "#00000")))
|
||||
|
||||
(mtt-define-test modus-themes--color-eight-to-six-digits
|
||||
(should (string= (modus-themes--color-eight-to-six-digits "#f00") "#f00"))
|
||||
(should (string= (modus-themes--color-eight-to-six-digits "#ff1919") "#ff1919"))
|
||||
(should (string= (modus-themes--color-eight-to-six-digits "#ffff19991999") "#ff1919")))
|
||||
|
||||
(mtt-define-test modus-themes-adjust-value
|
||||
"Test that `modus-themes-adjust-value' does the right thing.
|
||||
Also see `modus-themes-test--modus-themes--hex-to-rgb'."
|
||||
(should (string= (modus-themes-adjust-value "#ff0000" 10) "#ff1919"))
|
||||
(should (string= (modus-themes-adjust-value "#505050" 100) "#ffffff"))
|
||||
(should (string= (modus-themes-adjust-value "#505050" -100) "#000000"))
|
||||
(should (string= (modus-themes-adjust-value "#505050" 0) "#505050"))
|
||||
(should-error (modus-themes-adjust-value "#ff00" 10)))
|
||||
|
||||
(mtt-define-test modus-themes-activate
|
||||
(if (custom-theme-p 'modus-operandi-tritanopia)
|
||||
(should-not (modus-themes-activate 'modus-operandi-tritanopia))
|
||||
(should (custom-theme-p 'modus-operandi-tritanopia))))
|
||||
|
||||
(mtt-define-test modus-themes--belongs-to-family-p
|
||||
(should (modus-themes--belongs-to-family-p 'modus-operandi 'modus-themes))
|
||||
(should-not (modus-themes--belongs-to-family-p 'my-fancy-theme 'modus-themes))
|
||||
(should-not (modus-themes--belongs-to-family-p 'modus-operandi 'my-fancy-themes)))
|
||||
|
||||
(mtt-define-test modus-themes-get-all-known-themes
|
||||
(should (equal (modus-themes-get-all-known-themes) modus-themes-items))
|
||||
(should-not (modus-themes-get-all-known-themes 'my-fancy-themes)))
|
||||
|
||||
(mtt-define-test modus-themes--background-p
|
||||
(should (modus-themes--background-p 'modus-operandi 'light))
|
||||
(should-not (modus-themes--background-p 'modus-operandi 'dark))
|
||||
(should-not (modus-themes--background-p 'modus-operandi t))
|
||||
(should-not (modus-themes--background-p 'modus-operandi :light)))
|
||||
|
||||
(mtt-define-test modus-themes-sort
|
||||
(let ((first-has-prefix-fn (lambda (themes prefix)
|
||||
(when-let* ((first (car themes))
|
||||
(name (symbol-name first)))
|
||||
(string-match-p prefix name)))))
|
||||
(should (funcall first-has-prefix-fn (modus-themes-sort (reverse modus-themes-items) 'light) "modus-operandi"))
|
||||
(should (funcall first-has-prefix-fn (modus-themes-sort modus-themes-items 'dark) "modus-vivendi"))))
|
||||
|
||||
(mtt-define-test inheritance
|
||||
"Ensure all faces inherit from valid faces."
|
||||
;; Third-party packages, loaded if possible to better test face inheritance.
|
||||
(require 'font-latex nil t)
|
||||
(let ((current-theme (modus-themes-get-current-theme)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(modus-themes-load-theme 'modus-operandi)
|
||||
(should-not (seq-filter
|
||||
(lambda (face)
|
||||
;; The face either has no parent ...
|
||||
(if-let* ((parent (face-attribute face :inherit)))
|
||||
(and (symbolp parent)
|
||||
(not (eq parent 'unspecified))
|
||||
;; ... or its parent is a valid face.
|
||||
(not (facep parent)))))
|
||||
(face-list))))
|
||||
(modus-themes-load-theme current-theme))))
|
||||
|
||||
(mtt-define-test color-dark-p
|
||||
(let ((modus-operandi-sample-foregrounds
|
||||
'("#a60000"
|
||||
"#972500"
|
||||
"#a0132f"
|
||||
"#7f0000"
|
||||
"#006800"
|
||||
"#316500"
|
||||
"#00663f"
|
||||
"#2a5045"
|
||||
"#6f5500"
|
||||
"#884900"
|
||||
"#7a4f2f"
|
||||
"#624416"
|
||||
"#0031a9"
|
||||
"#3548cf"
|
||||
"#0000b0"
|
||||
"#003497"
|
||||
"#721045"
|
||||
"#8f0075"
|
||||
"#531ab6"
|
||||
"#7c318f"
|
||||
"#005e8b"
|
||||
"#3f578f"
|
||||
"#005f5f"
|
||||
"#005077"))
|
||||
(modus-vivendi-sample-foregrounds
|
||||
'("#ff5f59"
|
||||
"#ff6b55"
|
||||
"#ff7f86"
|
||||
"#ff9580"
|
||||
"#44bc44"
|
||||
"#70b900"
|
||||
"#00c06f"
|
||||
"#88ca9f"
|
||||
"#d0bc00"
|
||||
"#fec43f"
|
||||
"#dfaf7a"
|
||||
"#d2b580"
|
||||
"#2fafff"
|
||||
"#79a8ff"
|
||||
"#00bcff"
|
||||
"#82b0ec"
|
||||
"#feacd0"
|
||||
"#f78fe7"
|
||||
"#b6a0ff"
|
||||
"#caa6df"
|
||||
"#00d3d0"
|
||||
"#4ae2f0"
|
||||
"#6ae4b9"
|
||||
"#9ac8e0")))
|
||||
(should (seq-every-p #'modus-themes-color-dark-p modus-operandi-sample-foregrounds))
|
||||
(should-not (seq-every-p #'modus-themes-color-dark-p modus-vivendi-sample-foregrounds))))
|
||||
|
||||
(mtt-define-test get-readable-foreground
|
||||
(let ((modus-operandi-sample-foregrounds
|
||||
'("#a60000"
|
||||
"#972500"
|
||||
"#a0132f"
|
||||
"#7f0000"
|
||||
"#006800"
|
||||
"#316500"
|
||||
"#00663f"
|
||||
"#2a5045"
|
||||
"#6f5500"
|
||||
"#884900"
|
||||
"#7a4f2f"
|
||||
"#624416"
|
||||
"#0031a9"
|
||||
"#3548cf"
|
||||
"#0000b0"
|
||||
"#003497"
|
||||
"#721045"
|
||||
"#8f0075"
|
||||
"#531ab6"
|
||||
"#7c318f"
|
||||
"#005e8b"
|
||||
"#3f578f"
|
||||
"#005f5f"
|
||||
"#005077"))
|
||||
(modus-vivendi-sample-foregrounds
|
||||
'("#ff5f59"
|
||||
"#ff6b55"
|
||||
"#ff7f86"
|
||||
"#ff9580"
|
||||
"#44bc44"
|
||||
"#70b900"
|
||||
"#00c06f"
|
||||
"#88ca9f"
|
||||
"#d0bc00"
|
||||
"#fec43f"
|
||||
"#dfaf7a"
|
||||
"#d2b580"
|
||||
"#2fafff"
|
||||
"#79a8ff"
|
||||
"#00bcff"
|
||||
"#82b0ec"
|
||||
"#feacd0"
|
||||
"#f78fe7"
|
||||
"#b6a0ff"
|
||||
"#caa6df"
|
||||
"#00d3d0"
|
||||
"#4ae2f0"
|
||||
"#6ae4b9"
|
||||
"#9ac8e0")))
|
||||
(should (seq-every-p
|
||||
(lambda (value)
|
||||
(string= value "#ffffff"))
|
||||
(mapcar #'modus-themes-get-readable-foreground modus-operandi-sample-foregrounds)))
|
||||
(should (seq-every-p
|
||||
(lambda (value)
|
||||
(string= value "#000000"))
|
||||
(mapcar #'modus-themes-get-readable-foreground modus-vivendi-sample-foregrounds)))))
|
||||
|
||||
(mtt-define-test complete-palette-mappings
|
||||
"Ensure all built-in palettes contain entries for all palette mappings.
|
||||
This computes a complete list of mapping names from the built-in palettes
|
||||
and then cross-checks the palettes against the list. This should help ensure
|
||||
consistency and completeness where adding a new mapping in one palette will
|
||||
fail this test until it is added in all palettes."
|
||||
(let* ((operandi-names (seq-uniq (mapcar #'car modus-themes-operandi-palette)))
|
||||
(operandi-tinted-names (seq-uniq (mapcar #'car modus-themes-operandi-tinted-palette)))
|
||||
(operandi-deuteranopia-names (seq-uniq (mapcar #'car modus-themes-operandi-deuteranopia-palette)))
|
||||
(operandi-tritanopia-names (seq-uniq (mapcar #'car modus-themes-operandi-tritanopia-palette)))
|
||||
(vivendi-names (seq-uniq (mapcar #'car modus-themes-vivendi-palette)))
|
||||
(vivendi-tinted-names (seq-uniq (mapcar #'car modus-themes-vivendi-tinted-palette)))
|
||||
(vivendi-deuteranopia-names (seq-uniq (mapcar #'car modus-themes-vivendi-deuteranopia-palette)))
|
||||
(vivendi-tritanopia-names (seq-uniq (mapcar #'car modus-themes-vivendi-tritanopia-palette)))
|
||||
(all-names (seq-uniq (append operandi-names
|
||||
operandi-tinted-names
|
||||
operandi-deuteranopia-names
|
||||
operandi-tritanopia-names
|
||||
vivendi-names
|
||||
vivendi-tinted-names
|
||||
vivendi-deuteranopia-names
|
||||
vivendi-tritanopia-names))))
|
||||
(should (seq-empty-p (seq-difference all-names operandi-names)))
|
||||
(should (seq-empty-p (seq-difference all-names operandi-tinted-names)))
|
||||
(should (seq-empty-p (seq-difference all-names operandi-deuteranopia-names)))
|
||||
(should (seq-empty-p (seq-difference all-names operandi-tritanopia-names)))
|
||||
(should (seq-empty-p (seq-difference all-names vivendi-names)))
|
||||
(should (seq-empty-p (seq-difference all-names vivendi-tinted-names)))
|
||||
(should (seq-empty-p (seq-difference all-names vivendi-deuteranopia-names)))
|
||||
(should (seq-empty-p (seq-difference all-names vivendi-tritanopia-names)))))
|
||||
|
||||
(mtt-define-test modus-themes-generate-palette
|
||||
"Ensure `modus-themes-generate-palette' provides enough mapping coverage
|
||||
such that the generated palette does not inherit explicit color values
|
||||
from a parent core palette."
|
||||
(let* ((generated-palette (modus-themes-generate-palette
|
||||
'((fg-main "#ffffff")
|
||||
(bg-main "#000000")
|
||||
(red "#ff0000")
|
||||
(green "#00ff00")
|
||||
(yellow "#ffff00")
|
||||
(blue "#0000ff")
|
||||
(magenta "#ff00ff")
|
||||
(cyan "#00ffff"))))
|
||||
;; These are colors we expect to have an explicit hex value,
|
||||
;; either because they were provided explicitly in the call to
|
||||
;; `modus-themes-generate-palette' above, or because we expect
|
||||
;; `modus-themes-generate-palette' to generate the color.
|
||||
(explicit-colors '( fg-main bg-main
|
||||
fg-alt fg-dim bg-inactive bg-active bg-dim border
|
||||
;; cyan
|
||||
cyan bg-cyan-nuanced bg-cyan-subtle bg-cyan-intense
|
||||
cyan-intense cyan-faint cyan-cooler cyan-warmer
|
||||
;; magenta
|
||||
magenta bg-magenta-nuanced bg-magenta-subtle bg-magenta-intense
|
||||
magenta-intense magenta-faint magenta-cooler magenta-warmer
|
||||
;; blue
|
||||
blue bg-blue-nuanced bg-blue-subtle bg-blue-intense
|
||||
blue-intense blue-faint blue-cooler blue-warmer
|
||||
;; yellow
|
||||
yellow bg-yellow-nuanced bg-yellow-subtle bg-yellow-intense
|
||||
yellow-intense yellow-faint yellow-cooler yellow-warmer
|
||||
;; green
|
||||
green bg-green-nuanced bg-green-subtle bg-green-intense
|
||||
green-intense green-faint green-cooler green-warmer
|
||||
;; red
|
||||
red bg-red-nuanced bg-red-subtle bg-red-intense
|
||||
red-intense red-faint red-cooler red-warmer)))
|
||||
;; Ensure all other colors in the palette map to a color name and not an
|
||||
;; explicit hex value. If this check fails, the offending color should
|
||||
;; be mapped to an appropriate color name in `modus-themes-generate-palette'.
|
||||
(should (seq-empty-p (seq-remove (lambda (elem)
|
||||
(or (member (car elem) explicit-colors)
|
||||
(symbolp (cadr elem))))
|
||||
generated-palette)))))
|
||||
|
||||
(provide 'modus-themes-test)
|
||||
;;; modus-themes-test.el ends here
|
||||
|
||||
;; Local Variables:
|
||||
;; read-symbol-shorthands: (("mtt" . "modus-themes-test-"))
|
||||
;; End:
|
||||
Loading…
Reference in a new issue