These days GDM on Debian is running using Wayland, so the classic way of taking a screenshot using the X protocol does not work:
# Sleeping before launching the command allows to switch to the login screen
# before the screen gets actually captured.
# Otherwise if the login screen is not visible, only a black image will be
sudo -u Debian-gdm\
import -display :0 -win root /tmp/GDM-screenshot.png"
Most Gtk+ themes offer a “light” and a “dark” variant, however I found out that these names are just conventional: a Gtk+ theme can define variants with arbitrary names, so maybe this can be used for some fun stuff.