|
I also suggest adding a comment to specify that the colors must be in linear RGB mode, NOT sRGB which is what we get from popular colormap sources such as the ones in matplotlib. I was pulling my hairs today trying to figure out why the same thing on matplotlib and fastplotlib was different. |
Sorry, something went wrong.
|
@kushalkolar Could we take a look into this? I've been using it for a few months without issue. |
Sorry, something went wrong.
|
I also suggest adding a comment to specify that the colors must be in linear RGB mode, NOT sRGB which is what we get from popular colormap sources such as the ones in matplotlib. I was pulling my hairs today trying to figure out why the same thing on matplotlib and fastplotlib was different. pygfx uses sRGB by default, can you play with pygfx.Color("name").to_physical() and pygfx.Color.from_physical() to see what's happening? |
Sorry, something went wrong.
|
I also suggest adding a comment to specify that the colors must be in linear RGB mode, NOT sRGB which is what we get from popular colormap sources such as the ones in matplotlib. I was pulling my hairs today trying to figure out why the same thing on matplotlib and fastplotlib was different. pygfx uses sRGB by default, can you play with pygfx.Color("name").to_physical() and pygfx.Color.from_physical() to see what's happening? this is what i do. I set self._mesh = self._figure[0, 0].add_mesh(
self._mesh_vertices,
self._mesh_indices,
colors=self._random_colors,
mode="basic"
)
once. Then change that colors attribute with self._mesh.colors = any color array. It could be that i'm unknowingly bypassing the "to_physical" method, which explains why i have to convert to linear space myself |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
I didn't go further with creating a new parameter because this was much simpler.