import colorsys


def get_text_color(r, g, b, light_threshold=0.5):
    """
    Return black or white text color depending on the background color
    :param r: amount of red color
    :param g: amount of green color
    :param b: amount of blue color
    :param light_threshold: the threshold used to determine whether or not a color is dark or light
    :return: "k" if background color is light else "w"
    """
    _, light, _ = colorsys.rgb_to_hls(r, g, b)
    return "k" if light >= light_threshold else "w"