Open justinlaughlin opened 1 month ago
It looks like tests 15 and 17 are failing because they cycle color palettes backwards using P
, so they get around to the new palettes. Maybe we should restrict palettes that cycle to a subset of the total? Or update tests?
This seems like going a bit overboard with the palettes. 😁 The size of palettes.cpp
is essentially doubled in terms of lines!
I started with just a few, but it was taking a while so I wrote a script to help, and then I figured might as well add most 😆. I think we had 43 before and this adds 28? Could pare it down too...
Some suggestions from gm:
Extra colormaps + user defined ones would still be accessed through F6?
To clarify
Add option for user to point to custom colormap file
The idea will be to have an optional colormap file (could be configurable at build time, or just "colormaps.dat" in the same directory as the executable) and for glvis
to check for that file at startup and if found to add the additional colormaps at the end of the default list.
This way, we preserve the default behavior, while allowing for local customization.
There is a nice resource from Fabio Crameri that provides a lot of color-vision deficiency friendly and perceptually-uniform color maps [see issue 268, and reference]. This PR adds most of those colormaps into GLVis.
Here is an example of
batlow
I wrote a small script to help munge the colormap files into something copy-pasteable. I'm not sure if it's worth adding to the repo but I posted it as a gist. The colormaps added in this PR are listed in the gist: