def color_text(textin, color):
    """
    Adds Latex color to a string.
    """
    if '#' in color:
        textin = '{\\color[HTML]{%s} %s }' % (color.replace('#', '').upper(
            ), textin)
    else:
        textin = '{\\color{%s} %s }' % (color, textin)
    return textin
