Create nodes and save them as a group:
Math
Multiply, Hw Shader Nodes
Values
Color, and Hw Shader Nodes
Values
Float to create a MulOp, a Color and a Val node, respectively.
Create Group to create a group.
icon to enter group view. 
Save Group To Disk. Now when you work in the shader tree, you can choose MyNodes
Math
MyColorFunction to create a new instance of the custom group node.
