emacs-elpa-diffs
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]