I want to compare three values (RGB) and then pass the minimum (or maximum) along the node chain. For instance an input of (100,50,255) would output 50. The math node only allows you to pass along one value for comparison.

Does anyone know how I could accomplish this?

Thanks much.


1 Answer 1


Shader nodes? SeparateXYZ (or SeparateRGB, it doesn't matter, they do the same thing) and then run serial minimum operations:

enter image description here

Dividing by 255, because your numbers suggest you're interpreting color as values in 0,255 when Blender interprets colors as 0,1.

Serial maximum operations will work the same way.

If you want to, you can node group all of that stuff to make a MinimumVec node group, for easy reuse.

  • $\begingroup$ Duh. Thanks so much. Learning more each day. $\endgroup$
    – fmotion1
    Feb 19, 2021 at 20:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .