@classmethod
def from_pixel(cls, value):
    """Create RGB value from pillow getpixel() return value."""
    if isinstance(value, tuple):
        red, green, blue = value[:3]
    else:
        red, green, blue = [value] * 3
    return cls(red, green, blue)
