import json


def _read_color_map(path, object_hook=None):
    """
    Read a color map as json.
    :param path (str): The path to read the map from.
    :param object_hook (func): A Function to manipulate the json.
    :return: A dictionary of color map.
    """
    with open(path) as f:
        return json.load(f, object_hook=object_hook)