Create nodes and save them as a group
- Select Hw Shader Nodes > Math > Multiply, Hw Shader Nodes > Values > Color, and Hw Shader Nodes > Values > Float to create a Multiply, a Color and a Float node, respectively. 
- Connect the nodes as follows: - Connect the RGB attribute of Color to the Value attribute of Multiply. 
- Connect the float attribute of Float to the Value attribute of Multiply. 
- Connect the Result attribute of Multiply to the Diffuse Color attribute of TraditionalGameSurfaceShader. 
 
- Select the three newly created nodes, and then select Group > Create Group to create a group. 
- Click the Group  icon to enter group view. Select the group node and enter the following information in the Attribute Editor: icon to enter group view. Select the group node and enter the following information in the Attribute Editor:- Class name: MyColorFunction 
- Category name: MyNodes 
- Sub menu name: Math 
 
Select Group > Save Group to Disk. 
 Now, you can select MyNodes > Math > MyColorFunction to create a new instance of the group node.