Looking for Dynamo node can do random choice of 3 RGB colors

I am doing a random color tiles exercise in Dynamo Studio and intend to send it to Project Fractal. The best I could do is only the different tone (0-255) of one color. If I wan to randomize only 4 colors on the tiles, what nodes I can use from Dynamo Studio?

Thanks.

I added these nodes but it doesn’t give the randomness of three colors.

it appears you are shuffling the outer lists, not the inner color component lists. I think you should just use randomList node and then remap the values.

I believe a range nested in a Math.Random function which is then multiplied by 255 (maximum colors) and then rounded off should work.

The goal is randomly apply 1 of 3 selected RGB color to the tile. Let’s say Orange, Pink and Cyan. I have three sets of RGB. How do I make Dynamo to randomly pick 1 of 3 colors each time generating the next tile?

One possibility:

2 Likes

Thank you. It seems working. Let me try to apple the color selection portion on the script.

I still getting one color on all tiles. let me see where the logic problem is but your suggestion should be the right path.

The ‘List.GetItemAtIndex’ in my node is different then your. Yours have an ‘Item’ at the output. The one I have is a ‘var’. For unknown reasons, I can’t plug the output directly to ‘color’ input on ‘Display.ByGeometryColor’.

You’re getting different behavior because in my case I have a list of colors where as in your case, you have a list of sub-lists of color values. Since you have only a few colors, it would be more efficient to pass the color reference than to rebuild it from scratch every time.

Also, I am intended to send to Project Fractal so I can only use the Dynamo Studio native node. The color nodes in your script seems like a custom node.

If you wanted random color…
image

1 Like

The nodes are very efficient. It will be useful in a random color exercise.

It’s just the built in color node with some predefined inputs. You can definitely use that instead.

Thanks everyone’s input. It finally works.