def hex_to_int(hex_str):
    """Converts a hex string like `"#ff6d04"` to a hex integer.

    Args:
        hex_str: a hex string

    Returns:
        an integer
    """
    r = int(hex_str[1:3], 16)
    g = int(hex_str[3:5], 16)
    b = int(hex_str[5:7], 16)
    return (r << 16) + (g << 8) + b
Converts a hex string like `"#ff6d04"` to a hex integer.

    Args:
        hex_str: a hex string

    Returns:
        an integer
    
fiftyone/core/fields.py