def flash_it(self):
#println('def flash')
self.box_it() #clear it back to grey
#self.random=False
self.flash_choice=self.root.ids.flash.text
self.current=0
self.next = 1
self.column=0
self.direction=1
#xhold=self.current_color
self.dt=0 #delay time seconds
self.range=int(self.root.ids.spin.text)
if self.flash_choice=='Spiral':
self.x16 = [0, 1, 2, 3, 7, 11, 15, 14, 13, 12, 8, 4, 5, 6, 10, 9]
delay = 0
for button in self.x16:
p = partial(self.click_it, button)
Clock.schedule_once(p, delay)
delay += 0.5
def click_it(self, button, dt):
print(f'clickit {button} {dt}')
xcolor = self.current_color
if self.random:
xcolor = get_random_color()
self.button_list[button].background_color = xcolor
you can import get_random_color from kivy.utils.