What is the meaning of the color of the node sockets in the node editor?
Grey is a single value

Yellow is a tuple containing 3 values; the red, green, and blue channels of a color.

Purple is a tuple containing 3 values. Used for vector/coordinate information.

Green is a shader closure, representing a description of how light will interact with a surface or volume. This one can only be connected into other green sockets.


Note that these will be converted to/from each other automatically as much as possible:

Yellow and purple can be connected to each other without any loss of information (under the hood they are pretty much the same).

Grey can be connected to yellow or purple without any loss of information (all three values in the tuple will the same value)

Yellow and purple can be connected to gray, but will be converted to a single grayscale value:



More info on this link:
Cycles - (Shader) Nodes - inputs outputs - What are the exact data types?