Function: indent-bars--get-color

indent-bars--get-color is a natively compiled function defined in indent-bars.el.

Signature

(indent-bars--get-color STYLE DEPTH &optional CURRENT-HIGHLIGHT)

Documentation

Return the color appropriate for indentation DEPTH in STYLE.

If CURRENT-HIGHLIGHT is non-nil, return the appropriate highlight color, if setup (see indent-bars-highlight-current-depth).

Source Code

;; Defined in /nix/store/zkcdcnmcj3605fj09x584bf58d85brax-emacs-packages-deps/share/emacs/site-lisp/elpa/indent-bars-1.0.1/indent-bars.el
(defun indent-bars--get-color (style depth  &optional current-highlight)
  "Return the color appropriate for indentation DEPTH in STYLE.
If CURRENT-HIGHLIGHT is non-nil, return the appropriate highlight
color, if setup (see `indent-bars-highlight-current-depth')."
  (let ((palette (or (and current-highlight
			  (ibs/current-depth-palette style))
		     (ibs/depth-palette style))))
    (cond
     ((vectorp palette)
      (aref palette (mod (1- depth) (length palette))))
     (palette)  ; single color
     (t (ibs/main-color style)))))