I am looking for a method or a script that will help me assign colors that I set before to a number of objects. Lets imagine I have 100 panels I want to randomly color with 3 colors. I would not like to do it by hand really especially if the number grows to a 1000 or so. This way I could as well divide evenly all the panels into 3 groups. I found many scripts that randomise color into all the objects but there is no control over it. I know it can be done in grasshopper although I am having difficulty doing so.
Here is a quickie Python script that does what (I think) you want…
Select a bunch of objects
The color picker dialog will come up
Pick a color you want
Keep picking more colors to add to the set - the dialog will continue to come up until you hit the esc key or the cancel button in the dialog. No limit on how many
Colors will be randomly attributed to the selected objects from the set of colors you chose.
I’ve tried to modify grasshopper code but could not manage it. In the future I will try to set up randomisation of colors with possible options to control it a little bit ie 30% of color 1 etc. First of all need to find some time to learn basics of grasshopper.
Helvetosaur thank you so much ! This is exactly what I’ve been looking for. It will make me save a lot of time.
Hello Helvertosaur,
I know this is an old topic, but would be great if you can still help (or if anybody does).
Can I skip the color picking and just randomly assign different colors for the same number of objects I picked up? For example, I select 5 objects, and Rhino, automatically and randomly, assigns them 5 different colors. I hope the goal I’m looking for is clear. I’m asking this because sometimes I get files with 30 and more pieces inside in just one single layer
Wonderful scripts here… Wondering if HSVA can be combined into 1 script with control for each step?
e.g., randomise Hue + or - x degrees, saturation between 50-100, value between 0 - 50, alpha all 100?
This could be super helpful if it could also be applied for selected layers as well…
Is it possible so that when the colour wheel comes up, that it could remember the previously set color? That means that one could quickly change luminance etc of the same previous colour.
Can these scripts be applied to groups? That is, using the group like an object so that all the colours within the group are given one colour?