1313e/CMasher

XML format

lkoerber opened this issue · 3 comments

I love your colormaps. Could you provide them in XML format? That way e.g. ParaVIEW users could also benefit from your colormaps :) The files have the following form:

<ColorMaps>
<ColorMap name="cmap_name" space="RGB">
<Point x="0.000000" o="1" r="0.015312" g="0.022521" b="0.072729"/>
<Point x="0.003922" o="1" r="0.018005" g="0.025446" b="0.078419"/>
<Point x="0.007843" o="1" r="0.020901" g="0.028527" b="0.084078"/>
<Point x="0.011765" o="1" r="0.023998" g="0.031763" b="0.089708"/>
...
...
<Point x="0.988235" o="1" r="0.897592" g="0.978891" b="0.982505"/>
<Point x="0.992157" o="1" r="0.904501" g="0.983140" b="0.986001"/>
<Point x="0.996078" o="1" r="0.911330" g="0.987445" b="0.989444"/>
<Point x="1.000000" o="1" r="0.918059" g="0.991814" b="0.992833"/>
</ColorMap>
</ColorMaps>

Keep up the amazing work!

1313e commented

Hi @toelzstudios,

yeah, I could do that.
Would be very similar to the Tableau XML file CMasher can already create.

1313e commented

I will need to know what the exact format is around the file.
Where is the file to be placed?
What should its name be?
Should I expect non-colormap related details to be in that file?
Stuff like that.

I also think this would be a great feature. Paraview lists the following instructions for manually creating a colomap: https://www.paraview.org/Wiki/Manually_Creating_a_Colormap

However, as their documentation has always been somewhat less than stellar, I think it might be easier to copy what the cmocean visualization library has done to generate the xml files: https://github.com/kthyng/cmocean-paraview