ForColormap 1.0.0 released 🌈

We have just released :rainbow:ForColormap 1.0.0, two years after the previous 0.9 release. More than 140 commits were made.

@Ali mainly worked on refactoring the code, fixing bugs, improving performances, improving the CI (fpm, CMake, FORD and Fortitude) and adding new features. The tests were expanded and refactored by using generative AI, an interesting experience.

Concerning refactoring, files and modules were renamed according to fpm recommendations (a fpm clean or make clean is therefore recommended if you update your ForColormap). Another important change is the new colormap_metadata type for storing the properties of each available colormap.

Among the new features, we can cite:

  • a colorbar_ansi() method to preview the colormap in a truecolor ANSI terminal.

  • A blend() method to blend two colormaps according to blend = (1-alpha)*self + alpha*other.

  • A method export_paraview_preset() to export a colormap as a Paraview preset file (.json).

  • A find_index() method to retrieve a colormap index by its name.

  • get_ functions for getting colormap metadata.

On my side, I mainly worked on improving the FORD documentation and completely restructured it following the Diátaxis framework organized in four quadrants: Tutorials, How-to, Explanation, Reference. Just click on https://vmagnin.github.io/forcolormap/ and go on the Handbook tab (thanks @fxm).

We now plan to submit a JOSS paper and the feedback of the community is therefore precious. You can test ForColormap by simply cloning it and building/launching the examples available in the example directory, like demo.f90:

$ git clone git@github.com:vmagnin/forcolormap.git
$ cd forcolormap
$ fpm run --example demo

(fpm will automatically download its ForImage dependency)

P.s. Thanks to @jchristopherson for testing, and reviewing the CMake files.

10 Likes

This is great work, @vmagnin and @Ali. Thanks for sharing this and good luck with the JOSS submission. I’ve been meaning to return to the GMT-based plotting library I had started a while back. GMT uses simple tables with z-bound rgb values. I’ll explore generating these dynamically using compute_RGB.

1 Like