Something like?
;;; ==============================================================================
;;; Lisp Name: foo
;;; Author: Lonnie
;;; Date Created: 2024-08-06
;;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-color-to-all-layers/td-p/12942402
;;; Last Edited: [Insert Last Edit Date]
;;;
;;; DESCRIPTION:
;;; A routine to change the color of all layers in the current AutoCAD drawing
;;; to a specified color.
;;;
;;; Usage:
;;; 1. Load the Lisp routine.
;;; 2. Run the command "FOO" in AutoCAD.
;;;
;;; Parameters:
;;; color - The color number to apply to all layers.
;;;
;;; Returns:
;;; None
;;;
;;; Notes:
;;; - This routine changes the color of all layers in the current drawing to the
;;; specified color.
;;;
;;; ---------------------------- Main program --------------------------------;
(defun c:foo (/ color layer)
(vl-load-com)
(setq color (getint "\nEnter the color number to apply to all layers: "))
(vlax-for layer (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
(vla-put-color layer color)
)
(princ (strcat "\nAll layers have been changed to color " (itoa color) "."))
(princ)
)
This won't change everything to by layer and hardly addresses blocks but