Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def fg(name):
return foreground(
name2rgb(13),
black, white)
def get_colors(self, src, colorspace=None):
if colorspace is None:
if src.basename not in self.colors:
h = self.curhue
# self.curhue += 7 # relative prime with 360
self.curhue += 37 # relative prime with 360
self.curhue %= 360
# print "NAME:", src.name, "BASENAME:", src.basename
bg = colors.name2rgb(h)
black = (0, 0, 0)
white = (255, 255, 255)
fg = colors.foreground(bg, black, white)
self.colors[src.basename] = bg, fg
return self.colors[src.basename]
else:
return colorspace.color(src)