How do I detect if desktop is 256 color?

BlitzMax Forums/BlitzMax Programming/How do I detect if desktop is 256 color?

I'd rather `letting it crash` not be part of their experience. If I can at least exit gracefully that would be better, or give the option to wait until the mode is changed.