Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def color(self):
return Utility.lazy_get(self, '_color', Color.Color())
def background(self):
return Utility.lazy_get(self, '_background', Color.Color())
def color(self):
return Utility.lazy_get(self, '_color', Color.Color(0, 0, 0))
return '%0.2X%0.2X%0.2X%0.2X' % (self.a, self.r, self.g, self.b)
def __hash__(self):
return (self.a << 24) + (self.r << 16) + (self.g << 8) + (self.b)
def __eq__(self, other):
if not other:
return False
return self.r == other.r and self.g == other.g and self.b == other.b and self.a == other.a
def __str__(self):
return self.hex
Color.WHITE = Color(255, 255, 255, 255)
Color.BLACK = Color(0, 0, 0, 255)
def hex(self):
return '%0.2X%0.2X%0.2X%0.2X' % (self.a, self.r, self.g, self.b)
def __hash__(self):
return (self.a << 24) + (self.r << 16) + (self.g << 8) + (self.b)
def __eq__(self, other):
if not other:
return False
return self.r == other.r and self.g == other.g and self.b == other.b and self.a == other.a
def __str__(self):
return self.hex
Color.WHITE = Color(255, 255, 255, 255)
Color.BLACK = Color(0, 0, 0, 255)