def get_colorized_contents(contents, color_config):
    """Colorize the contents based on the color_config."""
    colorizer = color.EgColorizer(color_config)
    result = colorizer.colorize_text(contents)
    return result
Colorize the contents based on the color_config.
eg/util.py