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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/modus-operandi-theme 0bb261d 076/112: Define new fringe


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme 0bb261d 076/112: Define new fringe colours and faces
Date: Mon, 30 Mar 2020 15:59:42 -0400 (EDT)

branch: externals/modus-operandi-theme
commit 0bb261d9fd94d18e6ffdd95912f89e4fa6149000
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>

    Define new fringe colours and faces
    
    These are meant to be applied to indicators that are displayed in the
    fringes.
    
    The motivation is to improve contrast with the colour of the fringe,
    when the new customisation option is enabled by the user (see commit:
    
https://gitlab.com/protesilaos/modus-themes/-/commit/80fb704f83291acb23d646aa3e2463d78e5e3c93).
    
    At any rate, these additions will allow us to improve things regardless
    of that option.
---
 modus-operandi-theme.el | 20 ++++++++++++++++++++
 modus-vivendi-theme.el  | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 0de033d..9e75d5c 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -290,6 +290,12 @@ between foreground and background is >= 7:1)."
 (defface modus-theme-active-blue nil t)
 (defface modus-theme-active-magenta nil t)
 (defface modus-theme-active-cyan nil t)
+(defface modus-theme-fringe-red nil t)
+(defface modus-theme-fringe-green nil t)
+(defface modus-theme-fringe-yellow nil t)
+(defface modus-theme-fringe-blue nil t)
+(defface modus-theme-fringe-magenta nil t)
+(defface modus-theme-fringe-cyan nil t)
 (defface modus-theme-special-cold nil t)
 (defface modus-theme-special-mild nil t)
 (defface modus-theme-special-warm nil t)
@@ -423,6 +429,13 @@ between foreground and background is >= 7:1)."
       (red-active "#930000") (green-active "#005300")
       (yellow-active "#703700") (blue-active "#0033c0")
       (magenta-active "#6320a0") (cyan-active "#004882")
+      ;; styles that are meant exclusively for the fringes
+      ;;
+      ;; must have a minimum contrast ratio of 1.5:1 with `bg-inactive'
+      ;; and be combined with `fg-main'
+      (red-fringe-bg "#ff7a7a") (green-fringe-bg "#70cc70")
+      (yellow-fringe-bg "#e0c000") (blue-fringe-bg "#7fafff")
+      (magenta-fringe-bg "#ffa0ff") (cyan-fringe-bg "#00d0f0")
 
       ;; styles reserved for specific faces
       ;;
@@ -517,6 +530,13 @@ between foreground and background is >= 7:1)."
    `(modus-theme-active-blue ((,class (:background ,blue-active :foreground 
,bg-active))))
    `(modus-theme-active-magenta ((,class (:background ,magenta-active 
:foreground ,bg-active))))
    `(modus-theme-active-cyan ((,class (:background ,cyan-active :foreground 
,bg-active))))
+   ;;; for fringe indicators
+   `(modus-theme-fringe-red ((,class (:background ,red-fringe-bg :foreground 
,fg-main))))
+   `(modus-theme-fringe-green ((,class (:background ,green-fringe-bg 
:foreground ,fg-main))))
+   `(modus-theme-fringe-yellow ((,class (:background ,yellow-fringe-bg 
:foreground ,fg-main))))
+   `(modus-theme-fringe-blue ((,class (:background ,blue-fringe-bg :foreground 
,fg-main))))
+   `(modus-theme-fringe-magenta ((,class (:background ,magenta-fringe-bg 
:foreground ,fg-main))))
+   `(modus-theme-fringe-cyan ((,class (:background ,cyan-fringe-bg :foreground 
,fg-main))))
    ;;; special base values that are closer to the grayscale than
    ;;; the accents defined above
    `(modus-theme-special-cold ((,class (:background ,bg-special-cold 
:foreground ,fg-special-cold))))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 0e038e6..7c3511c 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -290,6 +290,12 @@ between foreground and background is >= 7:1)."
 (defface modus-theme-active-blue nil t)
 (defface modus-theme-active-magenta nil t)
 (defface modus-theme-active-cyan nil t)
+(defface modus-theme-fringe-red nil t)
+(defface modus-theme-fringe-green nil t)
+(defface modus-theme-fringe-yellow nil t)
+(defface modus-theme-fringe-blue nil t)
+(defface modus-theme-fringe-magenta nil t)
+(defface modus-theme-fringe-cyan nil t)
 (defface modus-theme-special-cold nil t)
 (defface modus-theme-special-mild nil t)
 (defface modus-theme-special-warm nil t)
@@ -423,6 +429,13 @@ between foreground and background is >= 7:1)."
       (red-active "#ffaa20") (green-active "#70e030")
       (yellow-active "#efdf00") (blue-active "#00ccff")
       (magenta-active "#d0acff") (cyan-active "#00ddc0")
+      ;; styles that are meant exclusively for the fringes
+      ;;
+      ;; must have a minimum contrast ratio of 1.5:1 with `bg-inactive'
+      ;; and be combined with `fg-main'
+      (red-fringe-bg "#a00000") (green-fringe-bg "#006600")
+      (yellow-fringe-bg "#775500") (blue-fringe-bg "#3228bb")
+      (magenta-fringe-bg "#990099") (cyan-fringe-bg "#005599")
 
       ;; styles reserved for specific faces
       ;;
@@ -517,6 +530,13 @@ between foreground and background is >= 7:1)."
    `(modus-theme-active-blue ((,class (:background ,blue-active :foreground 
,bg-active))))
    `(modus-theme-active-magenta ((,class (:background ,magenta-active 
:foreground ,bg-active))))
    `(modus-theme-active-cyan ((,class (:background ,cyan-active :foreground 
,bg-active))))
+   ;;; for fringe indicators
+   `(modus-theme-fringe-red ((,class (:background ,red-fringe-bg :foreground 
,fg-main))))
+   `(modus-theme-fringe-green ((,class (:background ,green-fringe-bg 
:foreground ,fg-main))))
+   `(modus-theme-fringe-yellow ((,class (:background ,yellow-fringe-bg 
:foreground ,fg-main))))
+   `(modus-theme-fringe-blue ((,class (:background ,blue-fringe-bg :foreground 
,fg-main))))
+   `(modus-theme-fringe-magenta ((,class (:background ,magenta-fringe-bg 
:foreground ,fg-main))))
+   `(modus-theme-fringe-cyan ((,class (:background ,cyan-fringe-bg :foreground 
,fg-main))))
    ;;; special base values that are closer to the grayscale than
    ;;; the accents defined above
    `(modus-theme-special-cold ((,class (:background ,bg-special-cold 
:foreground ,fg-special-cold))))



reply via email to

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