The buffer is an array of W_COLOR element. W_COLOR is a 3-short integer structure describing the RGB components of a color. The size of the array is given by the app.color global variable.
If the parameter palette is NULL, the desktop palette (app.palette) is used to restore the screen palette.
This function is used by EvntWindom() to handle desktop and window palettes depending on GEM events.