colorize(bg, base, fg, *text)

def colorize(bg, base, fg, *text):
    """ colorize(bg, base, fg, *text)
    """
    # All argument types must be str.
    rtext = [str(f) for f in text]

    return COLORIZE_FORMAT.format(
        _to_int(bg), _to_int(base), _to_int(fg), ''.join(rtext)
    )