diff options
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 87 |
1 files changed, 65 insertions, 22 deletions
@@ -657,17 +657,35 @@ modus-themes-variable-pitch-ui t) (load-theme 'modus-vivendi)) -(defun my/hsl-to-rgbhex (h s l) +(defun my/color-hsl-to-rgbhex (h s l) (apply 'color-rgb-to-hex `(,@(color-hsl-to-rgb h s l) 2))) -(defun my/decline-diff-hue (h) - (list-colors-display - (seq-map (lambda (l) (my/hsl-to-rgbhex h 1.0 l)) - '(0.04 0.08 0.16)))) +(defun my/color-hs1-l2 (c1 c2) + (pcase-let ((`(,h1 ,s1 _) (apply 'color-rgb-to-hsl + (color-name-to-rgb c1))) + (`(_ _ ,l2) (apply 'color-rgb-to-hsl + (color-name-to-rgb c2)))) + (message "hue %.3f with s %.3f l %.3f" h1 s1 l2) + (apply 'color-rgb-to-hex + `(,@(color-hsl-to-rgb h1 s1 l2) 2)))) + +(defun my/modus-rgb (key palette) + (let ((value (car (alist-get key palette)))) + (if (stringp value) + value + (car (alist-get value palette))))) + +(defun my/modus>=4-tune-faces () + (with-eval-after-load 'gnus + (set-face-foreground 'gnus-summary-normal-ancient "#989898")) ; ≡ -read + (with-eval-after-load 'magit + (set-face-foreground 'magit-blame-highlight "#989898") ; ≡ shadow + (set-face-background 'magit-blame-highlight "#1e1e1e"))) ; ≡ bg-dim (defun my/modus>=4-config () + (require-theme 'modus-themes) (setq modus-themes-bold-constructs t modus-themes-italic-constructs t modus-themes-mixed-fonts t @@ -678,23 +696,48 @@ (4 . (variable-pitch 1.05)) (t . (variable-pitch))) modus-themes-org-blocks 'gray-background) - (load-theme 'modus-vivendi-deuteranopia) - (setq modus-vivendi-deuteranopia-palette-overrides - ;; TODO: set bg-prompt? - `(;; (my/decline-diff-hue 0.14) - (bg-removed-faint "#141100") - (bg-removed "#282200") - (bg-removed-refine "#514400") - ;; (my/decline-diff-hue 0.59) - (bg-added-faint "#000914") - (bg-added "#001228") - (bg-added-refine "#002551") - ;; (my/decline-diff-hue 0.76) - (bg-changed-faint "#0b0014") - (bg-changed "#160028") - (bg-changed-refine "#2d0051") - ,@modus-themes-preset-overrides-faint)) - (load-theme 'modus-vivendi-deuteranopia)) + (setq modus-vivendi-palette-overrides + ;; THE LIGHT!!! IT BURNS USSSS!!! 🧌 + '((bg-dim "#0f0f0f") ; magit-diff-context-highlight, org-block + (bg-active "#303030") + (bg-inactive "#1e1e1e") + (bg-mode-line-active "#303030") + (bg-mode-line-inactive "#1e1e1e") + (bg-region "#242424") + ;; Original hues & saturations, much lower light. + (bg-hl-line "#191d26") + (bg-completion "#192546") + (bg-hover "#002f43") + ;; Darkened by 50%. + (bg-red-subtle "#3b0919") + (bg-green-subtle "#002719") + (bg-yellow-subtle "#2c2600") ; eldoc-highlight-function-argument + (bg-blue-subtle "#151648") + (bg-magenta-subtle "#331c39") + (bg-cyan-subtle "#00263c") + ;; Old deuteranopia diff colors (more or less) + darker backgrounds. + (bg-removed-faint "#140000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.04) + (bg-removed "#280000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.08) + (bg-removed-refine "#510000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.16) + (bg-removed-intense "#a30000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.32) + (fg-removed "#fecccc") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.90) + (fg-removed-intense "#ff3232") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.60) + (bg-added-faint "#000914") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.04) + (bg-added "#001228") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.08) + (bg-added-refine "#002551") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.16) + (bg-added-intense "#004ba3") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.32) + (fg-added "#cce3fe") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.90) + (fg-added-intense "#3290ff") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.60) + (bg-changed-faint "#0b0014") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.04) + (bg-changed "#160028") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.08) + (bg-changed-refine "#2d0051") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.16) + (bg-changed-intense "#513a00") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.16) + (fg-changed "#fef0cc") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.90) + (fg-changed-intense "#ffc532") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.60) + ;; Tweaks unrelated to dimming backgrounds: + (fg-region unspecified))) + (load-theme 'modus-vivendi) + (my/modus>=4-tune-faces)) (use-package emacs :when (>= emacs-major-version 28) |
