If you need to change the background color of your AutoCAD commandline - e.g. to indicate a certain status of your application - you can use the following simple LISP macro. You can call it directly from menus, from scripts or from your own applications.
This macro uses the ActiveX interface in VisualLISP, so you need to invoke (vl-load-com) at least once (or prepend this call to the macro).
Switch to red background:
(vla-put-TextWinBackgrndColor(vla-get-display(vla-get-preferences(vlax-get-acad-object)))255)
Back to white background:
(vla-put-TextWinBackgrndColor(vla-get-display(vla-get-preferences(vlax-get-acad-object)))16777215)
Similarly you can change the text color of your commandline with TextWinTextColor. The color numbers are Windows (OLE) color codes.