Changing graphics mode

Boolean SetScreenColorDepth(int depth)
{
    UInt16 reqDepth=depth;
    Err err = WinScreenMode(winScreenModeSet,NULL,NULL,&reqDepth,NULL);
    return !err;
}

Boolean RestoreScreenColorDepth(void)
{
    Err err = WinScreenMode(winScreenModeSetToDefaults,NULL,NULL,NULL,NULL);
    return !err;
}

You must set color depth before any window is created. Check error codes for unsupported modes.