🟣 Vector values convert to ⚫ scalar values by averaging all three components, therefore the following material should be white:

(both branches compare as equal)
⚠ At very big values the $ε = 0$ starts to fail due to floating point inaccuracies:
(383 m cube)
Crantisz'es answer is incorrect, if it worked by converting 🟣 vector through 🟡 color to ⚫ scalar, then this material wouldn't be black (I even increased εpsilon to 0.1
):


🟣 Vector is Converted to color (and vice-versa) by simply treating XYZ as RGB (I think it's fair to say it's reinterpretation, not conversion, the values in memory don't change), however, 🟣 vector and 🟡 color convert differently to ⚫ scalars:
- 🟣 vector to ⚫ scalar: $v = {1\over3} x + {1\over3} y + {1\over3} z = {x+y+z\over3}$
- 🟡 color to ⚫ scalar: $v = 0.2126r + 0.7152g + 0.0722b = $
luminance(rgb)


For completeness, ⚫ scalar converts both to 🟣 vector and 🟡 color by triplicating (repeating) its value on all 3 components, which maintains luminance, and so is a reverse operation for both $🟣➡⚫$ and 🟡➡⚫.
Geometry Nodes
In gnoodles the same rules apply, but additionally:
- All values convert to 🌸 boolean as False if they are $0$ (for vector all $xyz$ components must be zero; for color, RGB values must be $0$, but alpha doesn't matter)
- ⚫ floats convert to 🟢 integers by truncating, which is discarding the fractional part (rounding towards zero; flooring positive values and ceiling negative values).