branch: master
commit 183b8034e9343a600b24674091471eab86c899c4
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    Use a specific blending method for dark themes
    
    * colir.el (colir-blend): Use 'colir-compose-soft-light for dark themes.
    
    Fixes #278
---
 colir.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/colir.el b/colir.el
index 7eacbbd..e11ef7d 100644
--- a/colir.el
+++ b/colir.el
@@ -63,7 +63,10 @@
 C1 and C2 are triples of floats in [0.0 1.0] range."
   (apply #'color-rgb-to-hex
          (cl-mapcar
-          colir-compose-method
+          (if (eq (frame-parameter nil 'background-mode) 'dark)
+              ;; this method works nicely for dark themes
+              'colir-compose-soft-light
+            colir-compose-method)
           c1 c2)))
 
 (defun colir-blend-face-background (start end face &optional object)

Reply via email to