Volumetric colouring of a pipe

hi there,

I am trying to make an illustration for a friend, showing a 3dimensional graph about panarchy.
It is based on this image:

What I want to do is change the pipe’s colour according to each point’s position within the cube.
The idea is to create three gradients (one for each axis) and for each point to have the mix of the three colours.
here is roughly what I want to do:

I rarely use colour so I’m completely lost with this. I would appreciate any help.
panarchy.gh (5.3 KB)


To be clear, does the colour of the pipe surface need to match the interpolated gradients of the pipe-central-axis or of the pipe surface? If the pipe is thin the difference may not be visible, but for thick pipes it will be significant.

I haven’t thought of it to be honest.
I suppose surface coordinates would be more accurate but on the other hand, it’s only a conceptual graphic. Accuracy is not such a big factor.
So: whichever is easier

panarchy.gh (20.6 KB)

you could also multiply the colours instead of averaging them. Stained glass effect.

ps. To use axis-coordinates instead, all you have to do is project the mesh vertices onto the pipe curve prior to decomposing them.


this is an even more impressive effect than I expected!
Thank you!!!