(acad_colordlg color [flag])
If [flag] is set to nil, it disables the ByLayer and ByBlock buttons. Omitting the flag argument or setting it to a non-nil value enables the buttons.
A colornum value of 0 defaults to ByBlock, and a value of 256 defaults to ByLayer.
Example:
(setq layername "TESTLAYER" col nil linet "HIDDEN" defaultcol 3)
(while (not col)
(setq col (acad_colordlg defaultcol nil))
(if (not col)(alert "You must choose a color for this new layer!!!"))
)
(command ".layer" "m" layername "c" (itoa col) "" "l" linet "" "")