nglviewer/nglview

custom rgb color

Dan-Burns opened this issue · 4 comments

Hi,

If I try to assign a color to a shape, I end up with something different. Typically it's white or cyan.

Here's an example where I try to apply a green color.

image

Thank you for your help.

Dan

  • Version report
    nglview = 3.0.3
    ipywidgets = 7.6.0

hi @Dan-Burns

Please use RGB code. e.g: for that green color, use [0, 128, 0]

image

Thanks @hainm. I take it that only a subset of colors can be depicted?

Actually, it appears I can just normalize the color by dividing the rgb vector by 256 and I get the desired color.
Thanks again.