def setColor(self, colorset, fg, bg): if colorset in colorsets: return _snack.setcolor(colorsets[colorset], fg, bg) else: # assume colorset is an integer for the custom color set return _snack.setcolor(colorset, fg, bg)