def update(self, path, node):
        '''Update the dict with a new color using a 'path' through the dict. You can either pass an existing path e.g.
           'Scaffold.mutations' to override a color or part of the hierarchy or you can add a new leaf node or dict.'''
        assert(type(path) == type(self.name))
        assert(type(node) == type(self.name) or type(node) == type(predefined))

        d = self.color_scheme
        tokens = path.split('.')
        for t in tokens[:-1]:
            d = d.get(t)
            if d == None:
                raise Exception("Path '%s' not found.")
        d[tokens[-1]] = node