First....
Paste this code in a plain text file called CHCOL.LSP
;;; begin cut here
(defun C:CHCOL ( / hand newcolor thisobj )
(setq hand (getstring "\nEntity handle: "

)
(setq newcolor (getstring "\New entity color: "

)
(setq thisobj (entget (handent hand)))
(if (not (assoc 62 thisobj))
(entmod (append thisobj (list (cons 62 (cstoci newcolor)))))
(entmod (subst (cons 62 (cstoci newcolor))(assoc 62 thisobj) thisobj))
)
(entupd (handent hand))
)
(defun cstoci (str)
(setq str (strcase str))
(cond
((= str "RED"

1)
((= str "YELLOW"

2)
((= str "GREEN"

3)
((= str "CYAN"

4)
((= str "BLUE"

5)
((= str "MAGENTA"

6)
((= str "WHITE"

7)
((= str "BYLAYER"

256)
((= str "BYBLOCK"

0)
((= str "BY LAYER"

256)
((= str "BY BLOCK"

0)
((and (< 0 (atoi str)) (> 256 (atoi str))) (atoi str))
(nil))
)
;;; end cut here
Then
In a script file add this line....
replacing the handle and color with those you need....
(load "chcol"

chcol handle_here color_here
The handle and color must not be a variable in the script.
Cheers......