I think the behavior you describe is human perceptual mixing color, which the color need to be deal in HSV, HSL like color space. Then the mixing between two value can be meaningful.
Main Node
AVG Node Group
Circulate Connected Average Node
Circulate Details:
let color1, color2
if abs(color1 - color2) > 0.5:
then: # We need to get the closest average rather than the far one
output = avg(color1, color2) - 0.5
else:
output = avg(color1, color2)
The interpolation of HSV color can preserve saturated and value(brightness) and interpolate between color. While RGB value is bind to it's own R,G and B color, which make the color "dirty" when you trying to mix them directly.
I can't find directly HSV color ring node inside node editor so I manually separate them into HSV, and mix them together, and then combine them back to color. The given result is desirable compare to MixRGB node.
Different Behavior when Hue is difference by 180 degree
A more reasonable result using XYZ for interpolation and HSV for tuning
XYZ model is additive color space graphics - Calculation of a mixed color in RGB - Stack Overflow, it could be used in mixing light color properly, but in your requirement, HSV model is suitable for lightness, so manually separate them and combine after XYZ is done mixing.