[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dracula-theme f5918cb 136/187: Add a setting to force 24bi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dracula-theme f5918cb 136/187: Add a setting to force 24bit colors on 256 colors terms |
Date: |
Thu, 21 Oct 2021 18:05:10 -0400 (EDT) |
branch: elpa/dracula-theme
commit f5918cb7966ab9f8350371bbdd8767cb3db46de8
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>
Add a setting to force 24bit colors on 256 colors terms
---
README.md | 3 +++
dracula-theme.el | 21 +++++++++++++++------
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index b607b0c..c9be0df 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,9 @@ need to be set before `load-theme` is invoked for Dracula.
;; Use less pink and bold on the mode-line and minibuffer (default nil)
(setq dracula-alternate-mode-line-and-minibuffer t)
+
+;; Force 24 bit colors (regular colors) on terminals (default nil)
+(setq dracula-use-24-bit-colors-on-256-colors-terms t)
```
## Test
diff --git a/dracula-theme.el b/dracula-theme.el
index bb364fe..e168a94 100644
--- a/dracula-theme.el
+++ b/dracula-theme.el
@@ -56,6 +56,11 @@ The theme has to be reloaded after changing anything in this
group."
:type 'boolean
:group 'dracula)
+(defcustom dracula-use-24-bit-colors-on-256-colors-terms nil
+ "Use true colors even on terminals announcing less capabilities."
+ :type 'boolean
+ :group 'dracula)
+
;;;; Theme definition:
@@ -611,17 +616,21 @@ The theme has to be reloaded after changing anything in
this group."
(graphic-colors (mapcar #'cadr colors))
(term-colors (mapcar #'car (mapcar #'cddr colors)))
(tty-colors (mapcar #'car (mapcar #'last colors)))
- (expand-for-kind (lambda (kind spec)
- (cl-progv color-names kind
- (eval `(backquote ,spec))))))
+ (expand-for-kind
+ (lambda (kind spec)
+ (when (and (string= (symbol-name kind) "term-colors")
+ dracula-use-24-bit-colors-on-256-colors-terms)
+ (setq kind 'graphic-colors))
+ (cl-progv color-names (symbol-value kind)
+ (eval `(backquote ,spec))))))
(cl-loop for (face . spec) in faces
collect `(,face
((((min-colors 16777216)) ; fully graphical envs
- ,(funcall expand-for-kind graphic-colors spec))
+ ,(funcall expand-for-kind 'graphic-colors
spec))
(((min-colors 256)) ; terminal withs 256
colors
- ,(funcall expand-for-kind term-colors spec))
+ ,(funcall expand-for-kind 'term-colors spec))
(t ; should be only
tty-like envs
- ,(funcall expand-for-kind tty-colors
spec))))))))
+ ,(funcall expand-for-kind 'tty-colors
spec))))))))
;;;###autoload
- [nongnu] elpa/dracula-theme 05937df 111/187: Try a variant for background color in terminal, (continued)
- [nongnu] elpa/dracula-theme 05937df 111/187: Try a variant for background color in terminal, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme be7982f 113/187: Better gnus summary faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 75316aa 116/187: Begin to work on terminal colors fix, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 6483f60 119/187: Use a clearer color for comments in 256 colors mode, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 3a8a6f0 121/187: Add an entry about start_emacs_test.sh in the README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme d145ed5 125/187: Bump version, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 9f23772 126/187: Little customization for the test-profile.el file, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme b5c5ee4 127/187: Introduce variables to enable/disable custom font size on some headings, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 583a811 128/187: Add a new variable to enable an alternate modeline/minibuffer experience, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 5190395 133/187: Document new them settings, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme f5918cb 136/187: Add a setting to force 24bit colors on 256 colors terms,
ELPA Syncer <=
- [nongnu] elpa/dracula-theme fb010af 130/187: Use same colors for outline levels than org-mode titles, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 9b87aee 008/187: Emacs: improve ido-support., ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme aaed6dc 013/187: Updates copyright, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 47418dd 019/187: fixed typo affecting company annotation highlights, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme ffb2982 031/187: Add diff-hl-mode faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 5fe7a6e 041/187: Make dired header readable, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme b8ce40c 042/187: Use dark background and light foreground, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme caa9870 005/187: Release v1.2.0, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 74094e6 058/187: Merge pull request #31 from TheBaronHimself/master, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme ac1edaa 061/187: Merge pull request #33 from eigengrau/refactor, ELPA Syncer, 2021/10/21