How to get the Colour mode (BW,RGB, RGBA)

I have looked through the API and cant figure this out, i figure it must be in there, I can set it with context.enableRGBColor() or context.enableRGBAColor() (dosnt seem to be a setter for BW) but cant get it.
If anyone can tell me how I can get the current setting for BW, RGB, RGBA I would most thankful.