jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
942 stars 188 forks source link

Some colors supported by three.js are not allowed by traitlets #304

Open moorepants opened 4 years ago

moorepants commented 4 years ago

For example if I set a material color to grey in pythreejs I get an error and have to change it to gray, but you can see that three.js supports both grey and gray: https://github.com/mrdoob/three.js/blob/master/src/math/Color.js#L7.

vidartf commented 4 years ago

We are reusing the color trait from ipywidgets core. We could subclass it in pythreejs to add a few more colorwords (or this could be done in ipywidgets if these are commonly accepted CSS colorwords), if someone submit a PR implementing it :)

moorepants commented 4 years ago

Ok, I'm trying to swap out pythreejs in PyDy for our custom three.js wrapper and this issue came up. I'll look into it when I'm next working on it.