@staticmethod
def hex_to_rgb(hex_string, digits=2):
    """
        Yield RGB values from a hexadecimal string.
        """
    for i in range(1, len(hex_string), digits):
        yield int('0x%s' % hex_string[i:i + digits], 0)
