Connecting NodeSockets of differing types
RGB(A) to Value

It is neither a weighted sum nor the max channel (as is the case for Value in HSV) - instead it's something I don't understand at all, something to do with the black magic of color management, but I'm happy to write it here anyway :)

In node_shader_valToTgb.c is the function node_shader_exec_rgbtobw, which calls IMB_colormanagement_get_luminance(col). Inside that function, we have dot_v3v3(luma_coefficients, rgb) - the dot product of the input color and some apparently random numbers at the top of that file: luma_coefficients[3] = { 0.2126f, 0.7152f, 0.0722f };

Recreating that as a node setup in blender gives the same result as you'd get from plugging the color into a Color Ramp node or RGB to BW node:



The cube render is black meaning the difference = 0

Shader nodes are always only RGB and never include an alpha channel. However, in the compositor they do. When converting RGBA to a Value in the compositor, the alpha channel is simply ignored - only the RGB values are used.



RGB(A) to Vector

The alpha channel is simply discarded - Red becomes X, Green becomes Y, Blue becomes Z.

We can prove this by plugging a render into a Vector Curves node, and plugging that into a Viewer node - notice that the background becomes black (as the RGB values in that space were all 0):





Vector to RGB(A)

It's simply the opposite of what's said above. X becomes Red, Y becomes Green, Z becomes Blue. The alpha is always assumed to be 1.0.



Anything to Shader

This is the one exception - nothing is ever automatically converted to a shader, the result is always simply black, no matter what color or value you plug into it.

Personally I think this design is silly - if you plug a color straight into the material output (without going through any shaders first), you're expecting the result to be shadeless. But alas, this is not the case.



Value to RGB(A)/Vector

This is pretty obvious I think, but just for completeness: Whatever the value is becomes the same for each channel/axis when converted to RGBA/Vector (though the alpha channel simply = 1)



Have I missed anything?