RS keeping up with V7 - color-related methods with transparency

Hi @Dale,

With the introduction of transparency to Rhino colors in V7, the RhinoScript methods that deal with color are no longer reliable. Not being able to set the transparency is one thing (I don’t think there is a way, right?), but as soon as there is a transparency in a color, getting that color also does not work (Rhino returns some negative long numbers).

For example, make 2 objects, one with a transparent color. Then try to match that color to another object via sample script below (it does not work):

Call Rhino.ObjectColor(o2,c1)

Is there any hope to update RS color-related methods to work properly with transparencies and RGBA colors? Some of the RS-based tools are no longer working well with colors because of that.

thank you,


Hi @Jarek,

Although I haven’t been able to repeat this. I can see why this could happen. I’ll see if I can tune this up.

– Dale

Hi @Dale,

thanks for checking, in fact yesterday I was testing this on Layers and for some reason wrote here a sample for Objects. Now indeed when I try this script on Objects, the color, even with transparency works if I get it from Object A and apply to Object B.
But the same is not true for Layers for some reason.

I try this: make 2 layers, use snippet below:

Call Main()
Sub Main()
	Dim L1,L2,C1
	L1 = Rhino.GetLayer()
	C1 = Rhino.LayerColor(L1)
	L2 = Rhino.GetLayer()
	Call Rhino.LayerColor(L2, C1)
End Sub

If the 1st Layer color is, lets say Red, no transparency, all works OK, but If I add some transparency to it, the 2nd layer color becomes just white via this script. Is that something you see as well?

Also, do you think it would be possible to allow setting/getting the color transparency parameter via RhinoScript somehow?

I was trying to see and figure out which methods are/may be affected by this change, and the list is relatively shot:
GetColor (currently does not show the transparency color picker)

Is there a way to work with RGBa values in RhinoScript / VBScript in general? I was hoping there would be a way to take advantage of this new addition is updating some of our tools, in particular setting transparency in TextDot colors as we use them as the tools UI elements.



With the changes I’ve already made, these work as expected.

How about this?

– Dale

Looks promising, can’t wait to give it a try…


RH-65170 is fixed in Rhino 7 Service Release 10 Release Candidate

Hi @Dale,

All works as expected, thanks again!
I have noticed that the changes you made are not added to the RS Help file (New methods and enhanced method) / and the RS Editor syntax autocomplete. Would it make sense to keep the docs up to date?


As I am still working from home and the tools I need to generate .chm files are on a different system on our Seattle office, this will have to wait.

– Dale

1 Like