How to use the pyrender.color.Color.Color.from_hex function in pyrender

To help you get started, we’ve selected a few pyrender 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 qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
return self.color[1];

    @property
    def blue(self):
        return self.color[2];

    @property
    def alpha(self):
        return self.color[3];


## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
return self.color[2];

    @property
    def alpha(self):
        return self.color[3];


## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }


def get_color(value):
    """ Convert value to a Color object.

    Value can be a color name, a hex string or [r, g, b] values.
    """
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
"light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }


def get_color(value):
    """ Convert value to a Color object.

    Value can be a color name, a hex string or [r, g, b] values.
    """
    if isinstance(value, basestring):
        if value in color_table:
            return color_table[value];
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }


def get_color(value):
    """ Convert value to a Color object.

    Value can be a color name, a hex string or [r, g, b] values.
    """
    if isinstance(value, basestring):
        if value in color_table:
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
def green(self):
        return self.color[1];

    @property
    def blue(self):
        return self.color[2];

    @property
    def alpha(self):
        return self.color[3];


## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
def alpha(self):
        return self.color[3];


## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }


def get_color(value):
    """ Convert value to a Color object.
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }


def get_color(value):
    """ Convert value to a Color object.

    Value can be a color name, a hex string or [r, g, b] values.
    """
    if isinstance(value, basestring):
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),
        "light_blue"       : Color.from_hex("5DB4E5"),
        }


def get_color(value):
    """ Convert value to a Color object.

    Value can be a color name, a hex string or [r, g, b] values.
github qnzhou / PyRenderer / pyrender / color / Color.py View on Github external
    @property
    def blue(self):
        return self.color[2];

    @property
    def alpha(self):
        return self.color[3];


## Predefined colors
color_table = {
        "light_background" : Color.from_hex("FFFFFF"),
        "dark_background"  : Color.from_hex("332E30"),
        "nylon_white"      : Color.from_hex("FFFEEB"),
        "gray"             : Color.from_hex("CCCCCC"),
        "dark_gray"        : Color.from_hex("333333"),
        "black"            : Color.from_hex("000000"),
        "white"            : Color.from_hex("FFFFFF"),
        "red"              : Color.from_hex("FF0000"),
        "green"            : Color.from_hex("00FF00"),
        "#light_green"      : Color.from_hex("92C9B9"),
        "blue"             : Color.from_hex("0000FF"),
        "gold"             : Color.from_hex("AB9A10"),
        "yellow"           : Color.from_hex("EFE442"),
        "blue"             : Color.from_hex("57B4E9"),
        "orange"           : Color.from_hex("C05D23"),
        "light_orange"     : Color.from_hex("F4B25A"),
        "cheese_bubble"    : Color.from_hex("EDE695"),
        "cheese"           : Color.from_hex("FFFCCE"),
        "light_green"      : Color.from_hex("6BBE46"),
        "light_red"        : Color.from_hex("F3756D"),