import click


def get_highlighted_value(value, config: dict):
    """Returns the string representation of the given value highlighted.

    Arguments:
        value {Any} -- Value to highlight.
        config {dict} -- Config mapping loaded from `confreader.load_config`.

    Returns:
        str -- The highlighted string representation of the value.
    """

    def get_color(v):
        if isinstance(v, str):
            return config["highlight_text_color"]
        elif isinstance(v, (int, float)):
            return config["highlight_number_color"]
        return config["highlight_other_color"]

    return click.style(str(value), fg=get_color(value))