Use the set_gfx_mode function to set the resolution, set the color depth to use the set_color_depth function. But the set_color_depth function must be called before set_gfx_mode, otherwise there is no effect.