algorithmic modeling for Rhino
I'm a beginner to Grasshopper, trying to make a definition that rounds RGB values in an image to a given range. For instance, in the image you can see the list at left is 21, 97, 84 - and on the right it is rounded to 25, 100, 75. I've figured out the rounding portion, but when I plug the resulting list back into the custom preview, it doesn't recognize the data. I'm guessing it is because my rounded list is in curly brackets, whereas the unrounded data straight from the image sampler is not. How can I process this to remove the curly brackets?
Thanks,
Ryan
Tags:
Thank you! That worked. I'm wondering why though... in my image, the list at the bottom left is what goes into the custom preview that generates the color image. The list that comes out of your solution is in a slightly different format, so it surprised me when it worked. What does the (0) mean after each RGB entry?
Hi Ryan,
the number inside () is the Alpha value of the RGB component:
If you set it to 255 you will see that the number will go away and the list will look like yours.
Note that when you change this value nothing happens to the grid's colors though. I believe that is because the colors are applied to points. If they were applied to surfaces (or other geometry) you would see the transparency changing.
Hope this is clear,
cheers,
nikos
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by