Using the Node Editor
Creating a color graph
To create a new color graph, select Assets | Create | Gamelogic | Colors | Graph, or right click in the project view and select Create | Gamelogic | Colors | Graph. This will create a new graph asset in your project.
Once you have created file, click on it in the project view, and select Edit in the inspector. The Graph editor will open, from where you can add and edit nodes.
Working with nodes
To add a node, click one of the node buttons on the left of the window. Note that the first two buttons are not node buttons. A new node will appear, which you can drag to a convenient place on the window.
To remove a node, you can click on the Remove Node button on the node.
To remove all nodes from the graph, click the Clear button on the left of the window.
To add a link from one node to another, click on the first node’s Add link button. A link will appear, that you can connect to the second node by clicking on it. Not all nodes can be connected; the link will not form if it is illegal. Use the node reference to see which nodes are legal. To remove a link, click on the red disk in the middle of the link.
Computing the output
To generate colors, you need to click the Recompute button on the left of the window. Colors will only be computed for nodes that have the right inputs. Your graph should have at least one input node (Constant Color or Random Color). These nodes do not have inputs. All nodes can be used for inputs for other nodes. as long as they are of the right type.
Linking generated colors to your scene
Once you have created a graph with at least one input node, you can link it into your scene through scripting:
Add an InspectableColorNode serializable field to the script where you want to write the logic. This will allow you to link in the graph and select the node from which you want to get the colors from. You can add multiple fields of InspectableGraphNode if you want to access more than one node from your script.
In code, you can get the colors of the node if the InspectableColorNode field using its Colors property. This is simply a list of colours. You can now write code to apply these colors to materials, sprites, UI images, lights, or anywhere else you can adjust the color.
In the Unity editor, drag the graph object in the appropriate field, and select the node you want to work from.
The examples that ship with colors show a simple way to follow these three steps to color different scenes.