protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
553 stars 30 forks source link

Diff-hl colors #70

Closed twoeightdev closed 1 year ago

twoeightdev commented 1 year ago

Hi sir, i need help to remove the black color of diff-hl when modus operandi theme is enabled as i can't find the right face to modify. thank you

with modus-operandi theme:

with modus-operandi

without a theme:

without theme

here is the configuration of diff-hl

(setq-default diff-hl-show-staged-changes nil)

(define-fringe-bitmap 'me/diff-hl-insert [240] nil nil '(center t))
(define-fringe-bitmap 'me/diff-hl-change [240] nil nil '(center t))
(define-fringe-bitmap 'me/diff-hl-delete (make-vector 6 240) nil nil 'top)

(setq-default diff-hl-draw-borders nil)
(setq-default diff-hl-fringe-bmp-function #'me/diff-hl-fringe-bitmap)

(defun me/diff-hl-fringe-bitmap (type _position)
    "Return the name of the bitmap to use for a given change TYPE."
    (intern (format "me/diff-hl-%s" type)))

(add-hook 'text-mode-hook 'diff-hl-mode)
(add-hook 'prog-mode-hook 'diff-hl-mode)
(add-hook 'diff-hl-mode 'diff-hl-flydiff-mode)
(add-hook 'dired-mode-hook 'diff-hl-dired-mode)
protesilaos commented 1 year ago

Hello @hoaxdream! I guess you figured out it is the fringe face?

twoeightdev commented 1 year ago

@protesilaos yea sir. I preferred something like this.

(custom-set-faces
 '(org-block ((t (:inherit fixed-pitch))))
 '(fringe ((t (:background nil))))
 '(diff-hl-insert ((t (:inherit default :foreground "#6cc06c"))))
 '(diff-hl-change ((t (:inherit default :foreground "#d7c20a"))))
 '(diff-hl-delete ((t (:inherit default :foreground "#d84a4f")))))

diff-hl-changes

thanks again for this wonderful theme, have a nice day.