def rgb_to_hex(color_rgb):
    """Returns a color in hex format from a given color in rgb

    :param color_rgb: color in rgb format ex [256, 256, 256]
    :type color_rgb: list

    :return: color in hex format
    :rtype: string
    """
    return '%02x%02x%02x' % tuple(color_rgb)