def hex_string_to_full_rgb(hex_string):
    """Convert hex string into RGB(A) tuple and return it.

    RGB(A) values are integers in the range(256).

    Parameters
    ==========
    hex_string (string)
        string in the '#XXXXXX' or '#XXXXXXXX' format,
        where each pair of characters (excluding the '#')
        is an hexadecimal representation of an integer in
        the range(256), which represents one of the red,
        green and blue channels (maybe alpha as well)
        of a color.
    """
    ### remove '#' from string
    hex_string = hex_string[1:]

    ### convert each pair of characters into its
    ### respective integer (of base 16) value and return
    ### the resulting tuple

    return tuple(int(hex_string[i : i + 2], 16) for i in range(0, len(hex_string), 2))
Convert hex string into RGB(A) tuple and return it.

    RGB(A) values are integers in the range(256).

    Parameters
    ==========
    hex_string (string)
        string in the '#XXXXXX' or '#XXXXXXXX' format,
        where each pair of characters (excluding the '#')
        is an hexadecimal representation of an integer in
        the range(256), which represents one of the red,
        green and blue channels (maybe alpha as well)
        of a color.
    
nodezator/ourstdlibs/color/conversion.py