I found at least a workaround: I installed and use xscreensaver for locking the screen. Unlike light-locker that xfce uses by default, xscreensaver doesn't seem to mess with the colormap.
I should add: I am using nominally the same installation of debian 10 on two computers with very different hardware, a desktop and a laptop. Only the desktop computer is giving me the problems described earlier in this thread. Roland