

def get_rgb_values(self):
    "\n        Return (fg_red, fg_green, fg_blue, bg_red, bg_green, bg_blue) color\n        components.  Each component is in the range 0-255.  Values are taken\n        from the XTerm defaults and may not exactly match the user's terminal.\n        \n        If the foreground or background is 'default' then all their compenents\n        will be returned as None.\n\n        >>> AttrSpec('yellow', '#ccf', colors=88).get_rgb_values()\n        (255, 255, 0, 205, 205, 255)\n        >>> AttrSpec('default', 'g92').get_rgb_values()\n        (None, None, None, 238, 238, 238)\n        "
    if (not (self.foreground_basic or self.foreground_high)):
        vals = (None, None, None)
    elif (self.colors == 88):
        assert (self.foreground_number < 88), 'Invalid AttrSpec _value'
        vals = _COLOR_VALUES_88[self.foreground_number]
    else:
        vals = _COLOR_VALUES_256[self.foreground_number]
    if (not (self.background_basic or self.background_high)):
        return (vals + (None, None, None))
    elif (self.colors == 88):
        assert (self.background_number < 88), 'Invalid AttrSpec _value'
        return (vals + _COLOR_VALUES_88[self.background_number])
    else:
        return (vals + _COLOR_VALUES_256[self.background_number])

dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/display_common.py AttrSpec.get_rgb_values/original