mcneel / rhino3dm

Libraries based on OpenNURBS with a RhinoCommon style
MIT License
593 stars 134 forks source link

Color conversion issue #402

Closed dalefugier closed 3 years ago

dalefugier commented 3 years ago

From Discourse: https://discourse.mcneel.com/t/bug-in-layer-properties/125772

This code:

import rhinoinside
rhinoinside.load()

from System.Drawing import Color
from Rhino.DocObjects import Layer

layer = Layer()
layer.Color = Color.Blue
layer.Name = 'Layer'
layer.PlotColor = Color.Red
layer.LinetypeIndex = 2
layer.PlotWeight = 0.18

print(layer.Color)
print(layer.PlotColor)

prints the following:

Color [A=255, R=0, G=0, B=255]
Color [Blue]
dalefugier commented 3 years ago

Sorry, I see that this is Rhino.Inside, not Rhion3dm