def hit_to_indicator(hit, ioc_val_key='name', ioc_type_key=None, default_ioc_type=None, tags=None, tlp_color=None):
    """Convert a single hit to an indicator"""
    ioc_dict = hit.to_dict()
    ioc_dict['value'] = ioc_dict.get(ioc_val_key)
    ioc_dict['rawJSON'] = dict(ioc_dict)
    if default_ioc_type:
        ioc_dict['type'] = default_ioc_type
    elif ioc_type_key:
        ioc_dict['type'] = ioc_dict.get(ioc_type_key)

    ioc_dict['fields'] = {}
    if tags:
        ioc_dict['fields']['tags'] = tags
    if tlp_color:
        ioc_dict['fields']['trafficlightprotocol'] = tlp_color

    return ioc_dict