(Color Random) Error message "Object reference not set to an instance of an object"

Hi everyone,

I’m working with color random,
I have some mistakes when linking material to custom preview.
So I wish someone could help me.

Thanks a lot.
Color random.zip (6.4 MB)

It works fine at the first time, but when changing the value of the slider (jitter) the error message appears.

You can try to use the “Colour” component to convert types.

Uploading: 1.jpg…

Thank you so much,
It worked!

Also try this.

Thanks a lot,
That working fine.
Anyway, Do you know how to bake that geometries including colors for the result?

You can use the “Human” plugin:https://www.food4rhino.com/app/human

1 Like

Thanks alot for yor help @603419608
I will try.

One more question, I would like to ask your help.
When we working with color random, I want 2 identical colors not to be arranged side by side as little as possible.
Do you know any way to do for that condition, or how to control the random seed number/jitter number?
Thanks a lot.

You will not be able to solve that using a better seed selector. These kinds of constraints are difficult to achieve in grasshopper because they typically involve iterating over the collection while looking at the rest of the collection. This will almost certainly require custom looping code.

Thank for your quick reply.
I got it. So that means no way to find a good seed/fitter value, it is completely try to sliding till to meet a sequence we actually like.