code: def focusout(event):
          
          w = event.widget.spinbox
          bc = w.style.lookup("TEntry", "bordercolor", ("!focus",))
          dc = w.style.lookup("TEntry", "darkcolor", ("!focus",))
          lc = w.style.lookup("TEntry", "lightcolor", ("!focus",))
          w.style.configure("%s.spinbox.TFrame" % event.widget, bordercolor=bc,
                            darkcolor=dc, lightcolor=lc)
docs: Change style on focus out events.