如何在指定區域設置顔色

我希望在指定區域單擊鼠標左鍵執行某個函數,同時在該區域被點擊同時顯示一個顔色,請問要如何實現這個顔色功能

(setq column-region '(0 . 540))
(setq row-region '(0 . 960))

(defun org-scroll-down-by-click ()
  (interactive)
  (let (
        (mouse-x-pos (car (cdr (mouse-pixel-position))))
        (mouse-y-pos (cdr (cdr (mouse-pixel-position)))))
    (if (and
         (>= mouse-x-pos (car column-region))
         (<= mouse-x-pos (cdr column-region))
         (>= mouse-y-pos (car row-region))
         (<= mouse-y-pos (cdr row-region)))
	(progn
	  (when (and
		 (>= mouse-x-pos 0) (<= mouse-x-pos 540)
		 (>= mouse-y-pos 0) (<= mouse-y-pos 480))
	    (scroll-down))
	  ))))

应该只能按字符位置来算。pixel级的可能得在C里实现?

若是字符位置来算,可以添加一个local keymap或者minor mode keymap,里面添加mouse-1的定义。然后具体的显示颜色等估计就靠overlay了,没有细想。