@green.setter
def green(self, value):
    if isinstance(value, int):
        if (0 <= value <= 255):
            self.g = value
        else:
            raise ValueError('Int value of G is out of range 0-255: {0}'.format(value))
    elif isinstance(value, float):
        if (0.0 <= value <= 1.0):
            self.g = int((value * 255))
        else:
            raise ValueError('Float value of G is out of range 0.0-1.0: {0}'.format(value))
    else:
        raise TypeError('Color must be int or float')
@green.setter
def green(self, value):
    if isinstance(value, int):
        if (0 <= value <= 255):
            self.g = value
        else:
            raise ValueError('Int value of G is out of range 0-255: {0}'.format(value))
    elif isinstance(value, float):
        if (0.0 <= value <= 1.0):
            self.g = int((value * 255))
        else:
            raise ValueError('Float value of G is out of range 0.0-1.0: {0}'.format(value))
    else:
        raise TypeError('Color must be int or float')