Basically, you need to toggle between zero opacity and full, all though it might work better with one color (white) for all layers.
Preferably with a menu entry.
An example that creates two menu commands at the bottom of the “View” menu.
It sets all layers whose name begins with “Demo” to red, “New” to gray, and any others to white.
It saves the previous color settings, and adds a complimentary command to reset the layer colors back to previous.
EDIT: But,… this can add a bunch of undo operations to the undo stack.
See the next post , for an example that wraps the commands in named undo operations.
Example without undoable operations (click to expand…
@DanRathbun