G = nx.Graph()
G.add_edges_from([('A', 'B'), ('A', 'C'), ('D', 'B'), ('E', 'C'), ('E', 'F'
    ), ('B', 'H'), ('B', 'G'), ('B', 'F'), ('C', 'G')])
val_map = {'A': 1.0, 'D': 0.5714285714285714, 'H': 0.0}
values = [val_map.get(node, 0.25) for node in G.nodes()]
Draw different color for nodes in networkx based on their node value