import re
flippy = re.compile(r"#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})")
sheet = str(c.frame.top.leo_ui.styleSheet())
sheet = re.sub('(?i)white', '#ffffcc', sheet)
sheet = re.sub('(?i)#ffffff', '#ffccff', sheet)
for i in range(10):
sheet = flippy.sub(r'#\3\1\2', sheet)
c.frame.top.leo_ui.setStyleSheet(sheet)
copy it into a node and run it repeatedly. That's how fast Qt can
apply Leo's current stylesheet 10 times.
It cycles RGB to BRG repeatedly, so running it three times, 30 cycles,
brings you back to where you started, except that first it perturbs
white colors slightly, because RGB #ffffff moved to BRG is still
#ffffff.
I see a slight delay doing it 10 times, but of course it only needs to
be done once.
Cheers -Terry