Visual LISP is complicated. LISP2021 would simplify it.
Code:
(colorput <object identifier> 1)
where object identifier could be ObjectID, Handle, vla-object, entsel, ename, elist etc...
It returns T if successful.
Code:
(colorput <object identifier> -1)
would just return nil
Then you could use the try catch syntax
Code:
(if (and expression1
expression2
...
expressionN
)
return value or true
return error
)
also
Code:
(color <object identifier>)
returns the color
This syntax can be used for 99% of com object properties