def METHOD_NAME(rgb_col):
    '''
    rgb_col has to be a 2 axis array with shape [:, 3] or [:, 4] if has alpha
    math taken from https://en.wikipedia.org/wiki/HSL_and_HSV
    '''
    hsl_col = np.zeros(rgb_col.shape)
    max_comp = np.amax(rgb_col[:,:3], axis=1)
    min_comp = np.amin(rgb_col[:,:3], axis=1)
    delta = (max_comp - min_comp) * 6
    mask1 = max_comp == rgb_col[:, 0]
    mask2 = rgb_col[:, 1] >= rgb_col[:, 2]
    mask3 = rgb_col[:, 1] < rgb_col[:, 2]
    mask_g1= mask1 * mask2
    mask_g2= mask1 * mask3
    mask_g3 = max_comp == rgb_col[:, 1]
    mask_g4 = max_comp == rgb_col[:, 2]
    hsl_col[mask_g1, 0] = (rgb_col[mask_g1, 1] - rgb_col[mask_g1, 2]) / (delta[mask_g1])
    hsl_col[mask_g2, 0] = (rgb_col[mask_g2, 1] - rgb_col[mask_g2, 2]) / (delta[mask_g2]) + 1
    hsl_col[mask_g3, 0] = (rgb_col[mask_g3, 2] - rgb_col[mask_g3, 0]) / (delta[mask_g3]) + 1/3
    hsl_col[mask_g4, 0] = (rgb_col[mask_g4, 0] - rgb_col[mask_g4, 1]) / (delta[mask_g4]) + 2/3
    hsl_col[delta == 0, 0] = 0
    mask_s = max_comp == 0
    mask_s1 = min_comp == 1
    hsl_col[mask_s,1] = 0
    hsl_col[mask_s1,1] = 0
    mask_other = np.invert((mask_s + mask_s1) > 0)
    hsl_col[mask_other, 1] = (max_comp[mask_other] - min_comp[mask_other])/(1 - np.abs(max_comp[mask_other] + min_comp[mask_other] - 1))
    hsl_col[:, 2] = (max_comp + min_comp)/2
    if rgb_col.shape[1] == 4:
        hsl_col[:, 3] = rgb_col[:, 3]
    return hsl_col