vmagnin / forcolormap

A Fortran library for colormaps
https://vmagnin.github.io/forcolormap/
MIT License
21 stars 4 forks source link

Ideia for the logo #8

Closed aslozada closed 8 months ago

aslozada commented 11 months ago

The figure resembling a marble (canica in spanish). The colors inside the marble can be chosen from the Scientific color maps. If there is any interest, I can convert it to an SVG file. (fcm :wink: fpm )

fcm_ideia

vmagnin commented 11 months ago

Thanks Asdrubal for contributing, yes, please propose a SVG!

aslozada commented 11 months ago

A first test with Crameri's roma (steps 8 and 12) logo_fcm_formats

logo_fcm_roma_8 logo_fcm_roma_12

logo_formats

vmagnin commented 11 months ago

Nice! I prefer the first marble, with less different colors than the second one. And maybe the dark background.

I had the idea of using the Fortran purple, but I guess we could not obtain something pretty with it ...

vmagnin commented 11 months ago

Where did you get the roma font on his site?

aslozada commented 11 months ago

For the marble test, I obtained the RGB codes from this link, which contains a script (under the MIT license) for extracting color schemes from Crameri's color maps.

Of course, this was just for testing.

gha3mi commented 11 months ago

For the marble test, I obtained the RGB codes from this link

vmagnin commented 11 months ago

@vmagnin, we need to add the same steps functionality from the mentioned link.

Yes, it could be a method extract(colormap_name, levels). I guess it could not be theoretically perfect for any number of levels (a question of modulo), but if we start from 256 levels and extract only typically ~<12, that won't be visible to the eye.

aslozada commented 11 months ago

For the marble test, I obtained the RGB codes from this link

@vmagnin, we need to add the same steps functionality from the mentioned link.

An ideia for this funcionality

According to CIE (International Commission on Illumination (http://cie.co.at/) ), to achieve a consistent perception, the CIE 1976 Lab* can be used.

A prototype function is: ∆E=√(∆L)^2+(∆a)^2+(∆b)^2

∆E: total color difference ∆a: difference in red-green component ∆b: difference in yellow-blue component ∆L: difference in lightness

To implement in the forcolormap, extracting from Crameri's scheme:

  1. Convert RGB scheme to CIE 1976 Lab*
  2. Use ∆E
gha3mi commented 11 months ago

Thanks, @aslozada! This could be useful. As I started programming, I found it to be very challenging. This could be helpful!

aslozada commented 11 months ago

Thanks, @aslozada! This could be useful. As I started programming, I found it to be very challenging. This could be helpful!

An additional reference: convert from RGB to CIELab* requires two steps:

  1. convert RGB to XYZ
  2. convert XYZ to CIELab* see reference

.... Another issue: In the initial link, when extracting color schemes, you need at least two steps. The first step corresponds to the first color in the color map, and the second step corresponds to the last color in the color map. In general, the code provided in that link involves a maximum of 100 steps. In all cases, the first step uses the first color in the Crameri's color map, and the final step uses the last color in the Crameri's color map. The selection of intermediate colors is based on a criterion to ensure a consistent perception of colors. (I haven't reviewed all the code, yet.) Example: image

vmagnin commented 11 months ago

The selection of intermediate colors is based on a criterion to ensure a consistent perception of colors. (I haven't reviewed all the code, yet.)

One idea I had for discrete colormaps was to use https://en.wikipedia.org/wiki/Dyadic_rational Well, it would work with 2, 3, 5, 9, 17... colors.

gha3mi commented 11 months ago

This is what I worked on last week: original vanimo10: vanimo10 my created vanimo10: my_vanimo10 It's a bit hard for me to see, but there are small differences in the intermediate colors. We need to figure out the technique used for scientific colormaps to calculate interval sizes.

vmagnin commented 11 months ago

It's a bit hard for me to see, but there are small differences in the intermediate colors. We need to figure out the technique used for scientific colormaps to calculate interval sizes.

My eyes can't see the difference... The way discrete colormaps are built seems not explained in the paper or the website. And I have not found the code used to do it, I don't know if and where it is available.

aslozada commented 11 months ago

After a bit more reading:

The technique used in this link to extract the discrete color schemes is derived from ColorBrewer(by Cynthia Brewer / Repository). In summary, is a filter on a database. There isn´t a well-defined functional method for this task.

gha3mi commented 11 months ago

I implemented a subroutine that can perform extraction!

vmagnin commented 9 months ago

For the marble test, I obtained the RGB codes from this link, which contains a script (under the MIT license) for extracting color schemes from Crameri's color maps.

Of course, this was just for testing.

Hi @aslozada

vmagnin commented 9 months ago

@aslozada Which license do you prefer for your logo? A CC-BY-SA for example?

aslozada commented 9 months ago

@aslozada Which license do you prefer for your logo? A CC-BY-SA for example?

Yeah. The license CC-BY-SA is ok.

vmagnin commented 9 months ago

I have added the license. And put the logo at the head of the main README.md file.

gha3mi commented 9 months ago

The README with the logo looks great now!