While I am sure @komondormrex solution works, this is how I would have handled it.
(defun c:BlockEntityUpdate ( / oldColor newColor blks ct)
(or *acdoc* (setq *acdoc* (vla-get-activedocument (vlax-get-acad-object))))
(vla-StartUndoMark *acdoc*) ;set an undo point for quickly reverting changes
(setq oldColor (getint "Enter number of OLD color of block entities to change from: ")) ;old color
(setq newColor (getint "Enter number of NEW color of block entities to change into: ")) ;new color
(setq blks (vla-get-blocks *acdoc*)) ;vla blocks collection
(setq ct 0) ;count for how many entities colors were changed
(vlax-for blk blks ;loop through each block in the blocks collection
(if (not (or (= :vlax-true (vla-get-islayout blk)) (= :vlax-true (vla-get-isxref blk)))) ;make sure not an xref or paper/model/layout block
(vlax-for obj blk ;loop through each entity in the block
(if (= (vla-get-color obj) oldColor) ;entity color compare
(progn
(vla-put-color obj newColor) ;update entity color
(setq ct (+ ct 1)) ;count the entity color change
)
)
)
)
)
(vla-regen *acdoc* acActiveViewport) ;regen the viewport to display the updates to the user
(print (strcat "Updated " (itoa ct) " entities from color: " (itoa oldColor) " into new color: " (itoa newColor) ".")) ;notify the user of the changes
(vla-EndUndoMark *acdoc*) ;end the undo point
(princ)
)
Note: Attribute blocks will not update unless they are synced afterwards. I am hesitant to force sync them as people often times make modifications to them improperly (using grips or other methods).