Skip to content

Commit

Permalink
README.md and ROADMAP.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
vmagnin committed Mar 7, 2024
1 parent 1812427 commit 86041eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
![Logo ForColormap](logo/logo_forcolormap-roma_8.svg)
![](logo/logo_forcolormap-roma_8.svg)

# ForColormap
The ForColormap Fortran library is independent of any graphical toolkit: its main functionality is to convert a real value to RGB values that you can use with any drawing toolkit. It includes:

This Fortran library is independent of any graphical toolkit: its main functionality is to convert a real value to RGB values that you can use with any drawing toolkit. It offers various methods and options to manage colormaps. It includes:

* the 222 colormaps of the *Scientific colour maps* collection v8.0.1 by Fabio Crameri. See Fabio Crameri's poster ["Scientific Colour Maps"](https://www.fabiocrameri.ch/ws/media-library/a17d02961b3a4544961416de2d7900a4/posterscientificcolourmaps_crameri.pdf) for more information and my [No Bijection!](NO_BIJECTION.md) text about the mysteries and wonders of colors,
* the 222 colormaps of the *Scientific colour maps* collection v8.0.1 by Fabio Crameri. See Fabio Crameri's poster ["Scientific Colour Maps"](https://www.fabiocrameri.ch/ws/media-library/a17d02961b3a4544961416de2d7900a4/posterscientificcolourmaps_crameri.pdf) for more information,
* the "magma", "inferno","plasma", "viridis" [matplotlib colormaps](https://bids.github.io/colormap/),
* the Dave Green's [cubehelix](https://people.phy.cam.ac.uk/dag9/CUBEHELIX/) colormap,
* a few basic colormaps: "black_body", "fire", "rainbow", "inv_rainbow", "zebra".

And it offers various methods and options to manage colormaps.

## Basic usage

Assuming your graphical library has a `setpixelgb()`-like function and you know your `z` values will be for example in the [0, 2] range, you can write something like:
Expand All @@ -28,7 +28,7 @@ call cmap%compute_RGB(z, red, green, blue)
call setpixelrgb(x, y, red, green, blue)
```

The library is using the precision `wp=>real64` defined in the module `iso_fortran_env`. And depending on the integers expected by your graphical library, you may need to convert the kinds of red, green, blue variables by writing for example `int(red, kind=int16)` if you need 16 bit integers.
The library is using the precision `wp=>real64` defined in the module `iso_fortran_env`. And depending on the integers expected by your graphical library, you may need to convert the kinds of red, green, blue variables.

This [guideline](https://s-ink.org/colour-map-guideline) can help you choose the right kind of colormap. And you can visually choose the available colormaps in the [colormaps_list/ForColormap.pdf](https://github.com/vmagnin/forcolormap/blob/main/colormaps_list/ForColormap.pdf) manual or on this page (under development): [https://github.com/gha3mi/forcolormap/tree/dev](https://github.com/gha3mi/forcolormap/tree/dev)

Expand Down Expand Up @@ -59,7 +59,7 @@ To use ForColormap within your own `fpm` project, add the following lines to you

```toml
[dependencies]
forcolormap = {git = "https://github.com/vmagnin/forcolormap.git" }
forcolormap = {git = "https://github.com/vmagnin/forcolormap.git"}
```

### Using CMake
Expand All @@ -79,7 +79,7 @@ By default, ForColormap is built as a static library by CMake. You can compile y
```bash
$ gfortran -static my_program.f90 $(pkg-config --cflags --libs forcolormap forimage)
```
Note that ForColormap is depending on ForImage, and for linking you must respect that order.
Note that ForColormap is depending on ForImage, and for static linking you must respect that order.

#### Dynamic linking
There is a CMake option to obtain a shared library:
Expand Down Expand Up @@ -175,6 +175,7 @@ As any work, a colormap should be cited:
### Web pages

#### About colormaps
* [No Bijection!](NO_BIJECTION.md): a passionate text about the mysteries and wonders of colors.
* [https://en.wikipedia.org/wiki/Color_gradient](https://en.wikipedia.org/wiki/Color_gradient)
* [https://en.wikipedia.org/wiki/Heat_map](https://en.wikipedia.org/wiki/Heat_map)
* Ken Hughes, ["Default colormaps: Are Parula and Viridis really an improvement over Jet?"](https://brushingupscience.com/2019/10/01/default-colormaps-are-parula-and-viridis-really-an-improvement-over-jet/), posted on October 1, 2019.
Expand Down
12 changes: 7 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ The main goal of v0.9 is to offer a usable library, sufficiently friendly, with

## Version 1.0

The main goal of v1.0 is to offer a library with a stable API and a first version of a Diataxis documentation.
The main goal of v1.0 is to offer a library with a stable API, to improve the FORD documentation and to follow the Diátaxis documentation framework.

### Documentation

- [ ] Specify which colormaps are colorblind-friendly, perceptually uniform, B&W print safe, etc. This information could be included in the Diataxis documentation.
- [ ] Improve the FORD documentation, by adding FORD comments in the source code when needed.
- [ ] Initiate a Diátaxis documentation.
- [ ] Specify which colormaps are colorblind-friendly, perceptually uniform, B&W print safe, etc. This information could be included in the

### Deprecation

- [ ] Consider removing a few naive colormaps (e.g., "fire" is very similar to "black_body")
- [ ] Consider removing a few naive colormaps (e.g., "fire" is very similar to "black_body").

### Quality Assurance

Expand All @@ -71,7 +73,7 @@ The main goal of v1.0 is to offer a library with a stable API and a first versio

## Version 1.1

The main goal of v1.1 is to offer more features and to evolve the Diataxis documentation.
The main goal of v1.1 is to offer more features and to evolve the Diátaxis documentation.


# Ideas
Expand Down Expand Up @@ -105,7 +107,7 @@ These concepts are open for implementation or consideration. They may or may not

### Examples

- [ ] ...
- [ ] For the new features.

### Continuous Integration (CI)

Expand Down

0 comments on commit 86041eb

Please sign in to comment.