summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2023-01-08 16:07:38 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2023-01-08 16:11:14 +0100
commit3ce9408b8b4b252fa87efd860d3e725cb129aaac (patch)
tree401409d7a03a20ac6b8fb65408a492fd370ddabd
parentacebff1768978dc0e586defae3c524ef6c9f1c3f (diff)
downloaddotfiles-3ce9408b8b4b252fa87efd860d3e725cb129aaac.tar.xz
Tone down Ediff's "combined" & "ancestor" colors
Write down the method to the madness.
-rw-r--r--.emacs.d/eighters-theme.el18
1 files changed, 13 insertions, 5 deletions
diff --git a/.emacs.d/eighters-theme.el b/.emacs.d/eighters-theme.el
index 50d972a..2d09437 100644
--- a/.emacs.d/eighters-theme.el
+++ b/.emacs.d/eighters-theme.el
@@ -21,27 +21,35 @@
(lambda (l)
(cons l (eighters-hsl-to-hex h 1.0 (/ l 100.0))))
(number-sequence 0 100 light-step)))
- (buf (format "*%s variants" name)))
+ (buf (format "*%s variants*" name)))
(with-current-buffer (get-buffer-create buf)
(pcase-dolist (`(,l . ,hex) variants)
(insert
(propertize
- (format "%s %3s\t%.3f\n"
+ (format "%s %3s\t%6.3f\n"
hex l (modus-themes-contrast "#fff" hex))
'face `(:background ,hex :extend t)))))
(pop-to-buffer buf))))
+;; Let H be the set of all lightness variations of full-saturation hue h,
+;; CR(c) be the WCAG contrast-ratio function applied to (c, #fff),
+;; CR[S, P] be the set { CR(c) ∀ c∈S | P(c) },
+;;
+;; bg-h is c such that CR(c) = min(CR[H, >15])
+;; bg-x-dim is c such that CR(c) = max(CR[H, <19])
+;; bg-x-dimmer is c such that CR(c) = max(CR[H, <20])
+
(defvar eighters-palette
`((bg "#000") (bg-hl-dimmer "#0f0f0f") (bg-hl-dim "#181818") (bg-hl "#222")
(fg-red "brown2") (fg-red-dim "brown")
(bg-red "#560000") (bg-red-dim "#2d0000") (bg-red-dimmer "#1e0000")
(fg-green "chartreuse2") (fg-green-dim "#60ae13")
(fg-yellow "gold") (fg-yellow-dim "gold3")
- (bg-yellow "#705e00") (bg-yellow-dim "#5b4d00") (bg-yellow-dimmer "#473c00")
+ (bg-yellow "#2d2600") (bg-yellow-dim "#141100") (bg-yellow-dimmer "#0f0c00")
(fg-blue "steelblue1")
(bg-blue "#002647") (bg-blue-dim "#001323") (bg-blue-dimmer "#000b14")
(fg-magenta "violet") (fg-magenta-dim "#e64be6")
- (bg-magenta "#660065") (bg-magenta-dim "#420042") (bg-magenta-dimmer "#330032")
+ (bg-magenta "#470047") (bg-magenta-dim "#280028") (bg-magenta-dimmer "#190019")
(fg-cyan "cadetblue1") (bg-cyan "#063237")
(fg "#fff") (fg-dim "#bbb") (fg-dimmer "#888")))
@@ -94,7 +102,7 @@
`(dired-broken-symlink ((t (:background ,bg-red :foreground ,fg-yellow :weight bold))))
`(dired-header ((t (:inherit eighters-title-1))))
`(dired-special ((t (:foreground ,fg-yellow-dim))))
- `(eldoc-highlight-function-argument ((t (:background ,bg-yellow-dimmer :foreground ,fg-yellow :weight bold))))
+ `(eldoc-highlight-function-argument ((t (:background ,bg-yellow :foreground ,fg-yellow :weight bold))))
`(error ((t :foreground ,fg-red :weight bold)))
`(fringe ((t (:background ,bg-hl-dimmer))))
`(shadow ((t (:foreground ,fg-dimmer))))