def update_css(css, palette):
    """
        Updates a CSS string with values
        from the palette chosen.
    """
    css = css.replace("FGCOLOR", palette["foreground"])
    css = css.replace("BGCOLOR", palette["background"])
    css = css.replace("TXTCOLOR", palette["text"])
    css = css.replace("HIGHLIGHT", palette["highlight"])

    css = css.replace("CLOSED_IMG", palette["branch_closed_img"])
    css = css.replace("OPENED_IMG", palette["branch_opened_img"])

    css = css.replace("UNCHECKED_IMG", palette["unchecked_img"])
    css = css.replace("CHECKED_IMG", palette["checked_img"])

    return css