code: def _setup_toplevel_hook(self, color):
          
          def __toplevel__(*args, **kwargs):
              kwargs.setdefault("background", color)
              self.__init__toplevel(*args, **kwargs)
  
          tk.Toplevel.__init__ = __toplevel__
docs: Setup Toplevel.__init__ hook for background color