Transparency (Alpha channel) not available/not reported correctly via object attributes

If you apply some transparency to a an object in the Rhino document, then look in ObjectAttributes.ObjectColor for that object, it ignores the object color’s actual A value - the color returned is the fully opaque RGB color, the transparency (A) is always set to 255. To test, set an object semi-transparent via Properties, then run:

import rhinoscriptsyntax as rs
import scriptcontext as sc

print color.A,color.R,color.G,color.B

It seems to be already possible to apply transparency to an object via script, but without the above working, I don’t see how to get an object’s existing transparency level.

Thanks Mitch.

– Dale

Hi Dale,

Thanks! Note this also applies to layer colors… same problem. Can apply them but not get them from existing layers.

1 Like