[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/afternoon-theme cb4b2e7 7/8: Add terminal background color
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/afternoon-theme cb4b2e7 7/8: Add terminal background color fallback |
Date: |
Thu, 21 Oct 2021 17:57:39 -0400 (EDT) |
branch: elpa/afternoon-theme
commit cb4b2e7b96b9b43472c616d04c0cacb95c1fb9a7
Author: Ozan Sener <ozan@ozansener.com>
Commit: Ozan Sener <ozan@ozansener.com>
Add terminal background color fallback
This change hopefully fixes terminal background color issues by falling
back to more tolerable background colors when running under a 256 color
terminal (see #2).
---
afternoon-theme.el | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/afternoon-theme.el b/afternoon-theme.el
index f3c8a89..cb15af9 100644
--- a/afternoon-theme.el
+++ b/afternoon-theme.el
@@ -43,20 +43,21 @@
(deftheme afternoon
"Dark color theme with a deep blue background")
-(let ((class '((class color) (min-colors 89)))
-
- (background "#181a26")
- (current-line "#14151E")
- (selection "#103050")
- (foreground "#eaeaea")
- (comment "#969896")
- (red "#d54e53")
- (orange "goldenrod")
- (yellow "#e7c547")
- (green "DarkOliveGreen3")
- (aqua "#70c0b1")
- (blue "DeepSkyBlue1")
- (purple "#c397d8"))
+(let* ((class '((class color) (min-colors 89)))
+ (256color (eq (display-color-cells (selected-frame)) 256))
+
+ (background (if 256color "#1c1c1c" "#181a26"))
+ (current-line (if 256color "#121212" "#14151E"))
+ (selection "#103050")
+ (foreground "#eaeaea")
+ (comment "#969896")
+ (red "#d54e53")
+ (orange "goldenrod")
+ (yellow "#e7c547")
+ (green "DarkOliveGreen3")
+ (aqua "#70c0b1")
+ (blue "DeepSkyBlue1")
+ (purple "#c397d8"))
(custom-theme-set-faces
'afternoon
- [nongnu] branch elpa/afternoon-theme created (now 89b1d77), ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme b58731c 2/8: Initial upload, ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme e6fa1f8 4/8: Add a screenshot, ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme 89b1d77 8/8: Add terminal org-block-background fallback, ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme 25a1254 1/8: Initial commit, ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme fdecda2 3/8: Update README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme cb4b2e7 7/8: Add terminal background color fallback,
ELPA Syncer <=
- [nongnu] elpa/afternoon-theme 193ac72 5/8: Remove bold faces from mode-line, ELPA Syncer, 2021/10/21
- [nongnu] elpa/afternoon-theme 9ea5ab1 6/8: Add a non-retina screenshot showing JS code, ELPA Syncer, 2021/10/21