# Geometry Color

**URL:** <https://forum.dynamobim.com/t/geometry-color/42397>\
**Category:** Geometry\
**Created:** [October 27, 2019, 6:07pm UTC](https://forum.dynamobim.com/t/geometry-color/42397 "2019-10-27T18:07:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianbupa](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gianbupa](https://forum.dynamobim.com/u/gianbupa)\
**Post date:** [October 27, 2019, 6:07pm UTC](https://forum.dynamobim.com/t/geometry-color/42397/1 "2019-10-27T18:07:51Z")

</div>

Hello,  
I’m trying to get a color from a surface at a specific point as the image shown.

But when I use GetColorAtParameter, it asks for colorRange, which confuses me, because when I apply the picture onto the surface, i get a GeometryColor.  
Is there a sample that shows that?

Thanks

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2f63b168568559ff1840ec567d50a17117cdf511.jpeg)

---

<div class="post-metadata">

**Author:** ![Thomas\_Corrie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_corrie/32/63060_2.png) [@Thomas\_Corrie](https://forum.dynamobim.com/u/Thomas_Corrie)\
**Post date:** [October 27, 2019, 11:36pm UTC](https://forum.dynamobim.com/t/geometry-color/42397/2 "2019-10-27T23:36:25Z")

</div>

As you observe GetColorByParameter is an action on a ColorRange rather than GeometryColor. If you have used Image.Pixel to turn an image into colours to apply to a surface, then you can query the colours directly by using the UV parameters of the point from the surface to find the nearest pixel and get its colour:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/8/b805b7062a73db1272678267540c2256d79146f7.png)

[42397.dyn](https://forum.dynamobim.com/uploads/short-url/xhphOKkFftnMrbuITrQJmIu2rhn.dyn) (62.8 KB)

Hope this helps,  
Thomas

---

<div class="post-metadata">

**Author:** ![gianbupa](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gianbupa](https://forum.dynamobim.com/u/gianbupa)\
**Post date:** [October 29, 2019, 8:52am UTC](https://forum.dynamobim.com/t/geometry-color/42397/3 "2019-10-29T08:52:42Z")

</div>

Thanks,  
that helps a lot 😉

---

<div class="post-metadata">

**Author:** ![gianbupa](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gianbupa](https://forum.dynamobim.com/u/gianbupa)\
**Post date:** [October 29, 2019, 3:51pm UTC](https://forum.dynamobim.com/t/geometry-color/42397/4 "2019-10-29T15:51:25Z")

</div>

I’m trying to use this script, but it doesn’t seem to be working with multiple points.  
If i have a grid of points and would like to know every single point color I get all black.  
Can’t understand why. It works fine with single points.

On the other hand, is it possible to map a picture on a surface and get the color without specific libraries?

---

<div class="post-metadata">

**Author:** ![Thomas\_Corrie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_corrie/32/63060_2.png) [@Thomas\_Corrie](https://forum.dynamobim.com/u/Thomas_Corrie)\
**Post date:** [October 30, 2019, 2:34pm UTC](https://forum.dynamobim.com/t/geometry-color/42397/5 "2019-10-30T14:34:32Z")

</div>

Revised graph attached which can accept multiple queries using a small amount of Python (which could be done with normal nodes but it’s just a bit more concise this way)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/3/d30db01468a9341237715f69d06fe734120c77e0.png)

[42397-multiple.dyn](https://forum.dynamobim.com/uploads/short-url/cRzShNAEjwo4o7jB1RgkQhgSziU.dyn) (71.3 KB)

I don’t quite understand your last question? There are no specific libraries used here.

---

<div class="post-metadata">

**Author:** ![gianbupa](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gianbupa](https://forum.dynamobim.com/u/gianbupa)\
**Post date:** [October 30, 2019, 3:44pm UTC](https://forum.dynamobim.com/t/geometry-color/42397/6 "2019-10-30T15:44:02Z")

</div>

Thanks.  
Sorry for strange questions, but I am quite a noob right now.

I was doing something like that python script in codeblock, but didn’t work.  
Changing from x\*u to (x-1)\*u fixed it. I need to understand why now 😉

You answered my last question with that loop script. I was using Pattern toolkit for achieving the same result, but it doesn’t let me use my grid of points. So I was trying to create my own script to achieve that without using packages (sorry I wrote libraries).

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Michael\_Kirschner2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/michael_kirschner2/32/75576_2.png) [@Michael\_Kirschner2](https://forum.dynamobim.com/u/Michael_Kirschner2)\
**Post date:** [October 30, 2019, 10:06pm UTC](https://forum.dynamobim.com/t/geometry-color/42397/7 "2019-10-30T22:06:21Z")

</div>

this really bugs me too - I think it would be useful to be able to query the Display object for colors.

> <https://github.com/DynamoDS/Dynamo/blob/master/src/Libraries/GeometryColor/GeometryColor.cs#L15>

this would be the class I think that the functionality could be added to.
