def get_col(rho):
    """
    Get the index (in the color palette) of the current  capacity usage.

    Parameters
    ----------
    rho: ``float``
        The capacity usage of a given powerline.

    Returns
    -------
    res: ``int``
        The integer (between 0 and 6) of this line capacity usage in terms of color.

    """
    if rho < 0.3:
        return 0
    if rho < 0.5:
        return 1
    if rho < 0.75:
        return 2
    if rho < 0.9:
        return 3
    if rho < 0.95:
        return 5
    return 6
