How to assign Syrfacecolor?

Hi!
I try to use surface color in python, but I haven’t understood the example in documentation. May someone helps me?

surf =go.Surface(x=X1,y=Y1,z=Z1, surfacecolor=intensity)

X1, Y1, Z1 are two-dimensional arrays.
intensity – three-dimensional array, first and second idexes correspond to X1 and Y1, third is for RGB: intensity[:,:,0] is for red, intensity[:,:,1] is for green and intensity[:,:,2] is for blue.

What should I do to assign RGB numbers to surfacecolor?
Thanks in advance!

Hi @vanis,

Surface traces are colored by mapping the surfacecolor numeric values to colorsing using the current colorscale. So you’ll need to pass something to the surfacecolor property that is a 2D array of numbers that has the same 2D shape as x y and z. Then this will get mapped to colors according to the colorscale specified in the colorscale property.

Hope that helps clear things up,
-Jon

Thanks, I’ve got it)