summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/eighters-theme.el59
1 files changed, 35 insertions, 24 deletions
diff --git a/.emacs.d/eighters-theme.el b/.emacs.d/eighters-theme.el
index d122d36..cca4ce3 100644
--- a/.emacs.d/eighters-theme.el
+++ b/.emacs.d/eighters-theme.el
@@ -24,11 +24,17 @@
(buf (format "*%s variants*" name)))
(with-current-buffer (get-buffer-create buf)
(pcase-dolist (`(,l . ,hex) variants)
- (insert
- (propertize
- (format "%s %3s\t%6.3f\n"
- hex l (modus-themes-contrast "#fff" hex))
- 'face `(:background ,hex :extend t)))))
+ (let ((cr (modus-themes-contrast "#fff" hex)))
+ (when (> cr 7.0)
+ (insert
+ (propertize (format "%s %3s\t%6.3f\n" hex l cr)
+ 'face `(:background ,hex :extend t))))))
+ (pcase-dolist (`(,l . ,hex) variants)
+ (let ((cr (modus-themes-contrast "#000" hex)))
+ (when (> cr 7.0)
+ (insert
+ (propertize (format "%s %3s\t%6.3f\n" hex l cr)
+ 'face `(:foreground ,hex)))))))
(pop-to-buffer buf))))
;; Let H be the set of all lightness variations of full-saturation hue h,
@@ -36,21 +42,24 @@
;; 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])
+;; bg-h-dim is c such that CR(c) = max(CR[H, <19])
+;; bg-h-dimmer is c such that CR(c) = max(CR[H, <20])
+;;
+;; fg-h-subtle is (h, 100%, 85%)
(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 "#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 "#470047") (bg-magenta-dim "#280028") (bg-magenta-dimmer "#190019")
- (fg-cyan "cadetblue1") (bg-cyan "#063237")
+ (fg-red "brown2") (fg-red-dim "brown") (fg-red-subtle "#ffb2b2")
+ (bg-red "#560000") (bg-red-dim "#2d0000") (bg-red-dimmer "#1e0000")
+ (fg-green "chartreuse2") (fg-green-dim "#60ae13") (fg-green-subtle "#d8ffb2")
+ (fg-yellow "gold") (fg-yellow-dim "gold3") (fg-yellow-subtle "#fff3b2")
+ (bg-yellow "#2d2600") (bg-yellow-dim "#141100") (bg-yellow-dimmer "#0f0c00")
+ (fg-blue "steelblue1") (fg-blue-subtle "#b2dcff")
+ (bg-blue "#002647") (bg-blue-dim "#001323") (bg-blue-dimmer "#000b14")
+ (fg-magenta "violet") (fg-magenta-dim "#e64be6") (fg-magenta-subtle "#ffb2ff")
+ (bg-magenta "#470047") (bg-magenta-dim "#280028") (bg-magenta-dimmer "#190019")
+ (fg-cyan "cadetblue2") (fg-cyan-subtle "#b2f7ff")
+ (bg-cyan "#063237")
(fg "#fff") (fg-dim "#bbb") (fg-dimmer "#888")))
(defun eighters-show-palette ()
@@ -84,12 +93,12 @@
'eighters
;; Theme faces.
`(eighters-button ((t (:background ,bg-hl-dimmer :box (:color ,bg-hl :style released-button) :inherit eighters-ui))))
- `(eighters-title-1 ((t (:foreground ,fg-cyan :weight bold :height 1.40 :inherit variable-pitch))))
- `(eighters-title-2 ((t (:foreground ,fg-green :weight bold :height 1.24 :inherit variable-pitch))))
- `(eighters-title-3 ((t (:foreground ,fg-yellow :weight bold :height 1.18 :inherit variable-pitch))))
- `(eighters-title-4 ((t (:foreground ,fg-red :weight bold :height 1.12 :inherit variable-pitch))))
- `(eighters-title-5 ((t (:foreground ,fg-magenta :weight bold :inherit variable-pitch))))
- `(eighters-title-6 ((t (:foreground ,fg-blue :slant italic :inherit variable-pitch))))
+ `(eighters-title-1 ((t (:foreground ,fg-cyan-subtle :weight bold :height 1.40 :inherit variable-pitch))))
+ `(eighters-title-2 ((t (:foreground ,fg-green-subtle :weight bold :height 1.24 :inherit variable-pitch))))
+ `(eighters-title-3 ((t (:foreground ,fg-yellow-subtle :weight bold :height 1.18 :inherit variable-pitch))))
+ `(eighters-title-4 ((t (:foreground ,fg-red-subtle :weight bold :height 1.12 :inherit variable-pitch))))
+ `(eighters-title-5 ((t (:foreground ,fg-magenta-subtle :weight bold :inherit variable-pitch))))
+ `(eighters-title-6 ((t (:foreground ,fg-blue-subtle :slant italic :inherit variable-pitch))))
`(eighters-ui ((t (:inherit variable-pitch))))
;; Standard faces.
`(button ((t (:inherit eighters-button))))
@@ -199,7 +208,9 @@
;;; Magit.
;;;; Section backgrounds.
`(magit-section-highlight ((t :background ,bg-hl-dimmer)))
- `(magit-diff-revision-summary ((t (:weight bold :inherit magit-diff-hunk-heading))))
+ `(magit-diff-revision-summary ((t (:inherit (magit-diff-hunk-heading eighters-title-1)))))
+ `(magit-section-heading ((t (:inherit eighters-title-2))))
+ `(magit-diff-file-heading ((t (:inherit eighters-title-3))))
`(magit-diff-context ((t (:foreground ,fg-dim))))
`(magit-diff-context-highlight ((t (:background ,bg-hl-dimmer :inherit magit-diff-context))))
`(magit-diff-hunk-heading ((t (:background ,bg-hl-dim))))