Commit graph

2686 commits

Author SHA1 Message Date
Protesilaos Stavrou 9dd3b9074b
Acknowledge Mike Olson for commit c475454
This is what allows the modus-themes to be loaded in the early-init.el
because they no longer depend on color-name-to-rgb to be available at
that time.

This change was done in pull request 199: <https://github.com/protesilaos/modus-themes/pull/199>.
It is within the ~15-line limit, meaning that Mike does not need to
assign copyright to the Free Software Foundation.
2026-02-17 09:15:57 +02:00
Protesilaos Stavrou 9af856fb38
Merge pull request #199 from mwolson/fix/color-values-display-independence
Use color-values-from-color-spec instead of color-name-to-rgb
2026-02-17 09:13:13 +02:00
Mike Olson c475454d87 Use color-values-from-color-spec instead of color-name-to-rgb
Replace `color-name-to-rgb' with a new internal helper
`modus-themes--hex-to-rgb' that uses `color-values-from-color-spec'
(a C built-in since Emacs 28.1) to parse hex RGB strings without
any display dependency.

This fixes a crash when loading a Modus theme during early-init.el
on GUI Emacs (e.g. macOS Homebrew emacs-plus), where
`color-name-to-rgb' fails because `color-values' returns nil before
the display is ready.

The fix applies to all three direct call sites:
- `modus-themes-wcag-formula' (the critical one, called during
  theme loading)
- `modus-themes-generate-color-blend'
- `modus-themes-color-warm-p'

Fixes #198.
2026-02-16 15:04:35 -05:00
Protesilaos Stavrou 0ace30e471
Write tests for dark colour and readable colour 2026-01-31 10:14:40 +02:00
Protesilaos Stavrou b633768b7c
Rewrite mtt-inheritance test to restore the current Modus theme 2026-01-31 10:13:45 +02:00
Protesilaos Stavrou ea135519d3
Revert to using a readable foreground for the org-habit faces
This relies on our own functions, which should be available even if
the theme is loaded via the early-init.el.

Thanks to Jacod "Jake" Gordon for reminding me to fix this and for
testing my prototype. It was done in issue 197:
<https://github.com/protesilaos/modus-themes/issues/197>.
2026-01-31 10:00:35 +02:00
Protesilaos Stavrou 27456c3121
Change modus-themes--list-colors-tabulated to use our own function for a readable foreground (commit 2c225b6) 2026-01-31 10:00:07 +02:00
Protesilaos Stavrou 2c225b634e
Define function to get readable foreground, based on our own "dark-p" (per commit 4ecefd9) 2026-01-31 09:59:34 +02:00
Protesilaos Stavrou 4ecefd924f
Implement our own "dark-p" which relies on our WCAG formula test
This way I can more easily reason about the return value.
2026-01-31 09:58:21 +02:00
Protesilaos Stavrou 4b4fd65336
Change the parameter name in a couple of places to suggest it is a hexadecimal RGB colour 2026-01-31 09:56:45 +02:00
Protesilaos Stavrou 39682cd87c
Make stylistic changes to the WCAG formula functions 2026-01-31 09:56:13 +02:00
Protesilaos Stavrou ba747a245f
Change the scroll-bar background to ensure better visibility 2026-01-25 08:59:38 +02:00
Protesilaos Stavrou 0f6ce4f8bb
Remove the box and background from the completion group titles and make them optionally italic 2026-01-24 10:18:37 +02:00
Protesilaos Stavrou c57f158886
Only use bold in org-list-dt
The reason is that the foreground overrides other foregrounds, such as
for ~code~ elements.
2026-01-23 09:32:51 +02:00
Protesilaos Stavrou 55be658ddf
Use a background and box for the completion groups 2026-01-21 08:55:00 +02:00
Protesilaos Stavrou 8a45a1393a
Tweak the format of the modus-themes-with-colors error message 2026-01-13 06:31:26 +02:00
Protesilaos Stavrou 4d9a19513d
Update the copyright years 2026-01-11 12:45:54 +02:00
Protesilaos Stavrou 192b2f612e
Go back to using a "success" colour for git commit summary lines
This is because it is the only colour that is guaranteed to contrast
with the warning and error colours we use for long lines and non-empty
second line.
2026-01-10 07:57:30 +02:00
Protesilaos Stavrou 0b6956a783
Be more strict about how to check for loaded theme
This is because typically themes have a 'provide-theme' in their file,
which we do not have in our theme files. Not doing a 'provide-theme'
at all times can break user configurations.

Thanks to Daniel Colascione for pointing this out in issue 195:
<https://github.com/protesilaos/modus-themes/issues/195>.
2026-01-10 07:51:08 +02:00
Protesilaos Stavrou 073e1d2488
Remove outdated comment 2026-01-09 07:11:35 +02:00
Protesilaos Stavrou afe5c14f30
Acknowledge Steven Allen for commit e22df92
This was done in pull request 194: <https://github.com/protesilaos/modus-themes/pull/194>.
Steven has assigned copyright to the Free Software Foundation.
2026-01-09 07:03:49 +02:00
Protesilaos Stavrou 8f05f03bc9
Merge pull request #194 from Stebalien/steb/fix-gradients
Lighten/darken colors in a specified direction instead of guessing
2026-01-09 07:01:09 +02:00
Steven Allen e22df9248c Lighten/darken colors in a specified direction instead of guessing
Previously, we'd sometimes specify a direction, but then we'd guess the
direction again `modus-themes-generate-gradient'. This commit removes
that guess and specifies the direction explicitly in all cases.

fixes https://github.com/protesilaos/ef-themes/issues/65
2026-01-08 09:48:03 -08:00
Protesilaos Stavrou be8111f267
Acknowledge ukiran03 for commit 7eeadab
This 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.
2026-01-08 18:36:44 +02:00
Protesilaos Stavrou 7eeadab5d8
Merge pull request #193 from ukiran03/widget-field-underline
Set widget-field underline face to border color
2026-01-08 18:35:38 +02:00
Protesilaos Stavrou e438a2fcdc
Acknowledge JD Smith for commit e8dee25
This was done in pull request 191: <https://github.com/protesilaos/modus-themes/pull/191>.
2026-01-08 06:46:35 +02:00
Protesilaos Stavrou b38aaf265f
Merge pull request #191 from jdtsmith/with-colors-symbol-macrolet
Rewrite modus-themes-with-color to use cl-symbol-macrolet
2026-01-08 06:45:36 +02:00
ukiran03 f5df8edd15 Set widget-field underline face to border color
The widget-field underline inherits the foreground color by default.
This change ensures it uses the border face for better visual
consistency.

Fixes: https://github.com/protesilaos/modus-themes/issues/192
2026-01-05 10:13:32 +05:30
JD Smith e8dee25bd6 Rewrite modus-themes-with-color to use cl-symbol-macrolet
To address bugs associated with real color vs. mapped color ordering
and other issues, we swap the let* form construction for
cl-symbol-macrolet.
2026-01-04 09:37:20 -05:00
Protesilaos Stavrou 53fa9fd23d
Document how users can configure vc-annotate colours 2026-01-03 07:55:35 +02:00
Protesilaos Stavrou 3247c5d0f7
Add support for the faces of my pulsar package
Their colours are consistent with Modus by default, but they will not
necessarily look right in Modus derivatives.
2026-01-02 12:48:46 +02:00
Protesilaos Stavrou d1a9fbb4e6
Add support for the faces of my lin package
Their colours are consistent with Modus by default, but they will not
necessarily look right in Modus derivatives.
2026-01-02 12:47:00 +02:00
Protesilaos Stavrou 5b4747748e
Port emacs.git commit e09990891ffac9fa20385a8a38a18edf2e27d246
This is done by Eshel Yaron, as discussed on the mailing list:
<https://lists.gnu.org/archive/html/emacs-devel/2026-01/msg00011.html>.
2026-01-02 11:33:54 +02:00
Protesilaos Stavrou d1037f1322
Update to modus-themes version 5.2.0 2025-12-31 10:34:19 +02:00
Protesilaos Stavrou fc20e2bf7a
Cover the xref-file-header face 2025-12-28 11:28:54 +02:00
Protesilaos Stavrou 89185784ea
Fix typo in doc string 2025-12-28 08:31:47 +02:00
Protesilaos Stavrou 6dcd369037
Use a higher luminance value for modus-themes-generate-gradient 2025-12-23 07:58:45 +02:00
Protesilaos Stavrou cd01e5ead6
Use shorthands in the tests' file 2025-12-23 07:17:20 +02:00
Protesilaos Stavrou d673df22ca
Make small tweaks to modus-themes-test-inheritance 2025-12-23 07:06:55 +02:00
Protesilaos Stavrou 46d4b49266
Update the manual on account of commit 7a86cf4 2025-12-19 15:06:58 +02:00
Protesilaos Stavrou 7a86cf49a8
Revise modus-themes-with-colors to work with dynamic variables
This is how it used to be. I am addressing a regression that was
introduced in Modus themes version 5.0.0.

Thanks to Alexandr Semenov and realazy for testing my patch in issue
170: <https://github.com/protesilaos/modus-themes/issues/170>.
2025-12-19 15:04:34 +02:00
Protesilaos Stavrou 4ac7fdd6c7
Rewrite the completion table and expand it with group and display sort functions 2025-12-13 04:56:09 +02:00
Protesilaos Stavrou c8a6aa6998
Apply a faint foreground to marginalia-file-name 2025-12-13 04:55:29 +02:00
Protesilaos Stavrou 03c716e5bb
Merge pull request #189 from basil-conto/blc/spell
Fix some docstring typos
2025-12-11 08:44:16 +02:00
Protesilaos Stavrou cb99f74bc9
Merge pull request #188 from rudolf-adamkovic/main
Fix incorrect face inheritance affecting AUCTeX
2025-12-11 08:44:05 +02:00
Protesilaos Stavrou 0358a2a460
Merge pull request #190 from basil-conto/blc/push
Minor logic simplifications
2025-12-11 08:42:51 +02:00
Basil L. Contovounesios 83670578ea
Minor logic simplifications
Prefer push over add-to-list when membership equal-ity is not
needed.  Simplify some boolean expressions.
2025-12-09 14:06:08 +01:00
Basil L. Contovounesios e1154773ce
Fix some docstring typos 2025-12-09 13:56:01 +01:00
Rudolf Adamkovič 9649a18f69 Fix incorrect face inheritance affecting AUCTeX 2025-12-08 14:35:29 +01:00
Protesilaos Stavrou 64735b7df0
Remove duplicate entries for faces
Thanks to Basil L. Contovounesios for pointing this out in issue 185:
<https://github.com/protesilaos/modus-themes/issues/185>.
2025-12-06 09:59:42 +02:00