Skip to content

update vertextcolor description to note the range of the values #3348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chriddyp opened this issue Dec 18, 2018 · 2 comments · Fixed by #3688
Closed

update vertextcolor description to note the range of the values #3348

chriddyp opened this issue Dec 18, 2018 · 2 comments · Fixed by #3688
Assignees

Comments

@chriddyp
Copy link
Member

I was just reading through a community member's notebook (https://plot.ly/~empet/15040/plotly-mesh3d-from-a-wavefront-obj-f/#/) and came across this comment:
image

Indeed, looks like the vertexcolor description is a little terse, could mention that this color needs to be normalized between 0 and 1, unlike other color mappings:

vertexcolor: {
valType: 'data_array',
role: 'style',
editType: 'calc',
description: [
'Sets the color of each vertex',
'Overrides *color*.'
].join(' ')
},

@etpinard
Copy link
Contributor

Hmm. RGB colors seem to work ok:

https://codepen.io/etpinard/pen/GPNwYX?editors=0010

@archmoj
Copy link
Contributor

archmoj commented Dec 19, 2018

@etpinard I think the point is that when users have 3-D models in OBJ format (where the alpha is written in the range of 0 to 255), they need to map it to fit in [0,1]. So they can't use their raw alpha values such as 127 in this example.

@archmoj archmoj added bug something broken and removed type: documentation labels May 23, 2019
@archmoj archmoj self-assigned this May 23, 2019
@archmoj archmoj changed the title update vertextcolor description to note the range of the values Problem with gl3d rgba colours when alpha is in range 0 - 255 May 23, 2019
@archmoj archmoj changed the title Problem with gl3d rgba colours when alpha is in range 0 - 255 update vertextcolor description to note the range of the values May 23, 2019
@archmoj archmoj added type: documentation and removed bug something broken labels May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants