How to use the pyexcelerate.Color.Color function in PyExcelerate

To help you get started, we’ve selected a few PyExcelerate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kz26 / PyExcelerate / pyexcelerate / Font.py View on Github external
def color(self):
        return Utility.lazy_get(self, '_color', Color.Color())
github kz26 / PyExcelerate / pyexcelerate / Fill.py View on Github external
def background(self):
        return Utility.lazy_get(self, '_background', Color.Color())
github kz26 / PyExcelerate / pyexcelerate / Border.py View on Github external
def color(self):
        return Utility.lazy_get(self, '_color', Color.Color(0, 0, 0))
github kz26 / PyExcelerate / pyexcelerate / Color.py View on Github external
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)
github kz26 / PyExcelerate / pyexcelerate / Color.py View on Github external
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)