Viridis in Igor (and other custom color maps)

Hi,

I just read about Viridis, a color-blind and greyscale-printing friendly colour palette, and want to program it into Igor.

I don't really know where to start, and would also like to spare myself the effort, so I wonder if anyone has already done it or something similar?

This website provides a quick summary of why Viridis should be used.

j

Sounds like a worthwhile endeavour.

The built-in GreenMagenta16, EOSOrangeBlue11, and  EOSSpectral11 color tables are also designed to be red-green colorblind-friendly:

displayHelpTopic "Igor Pro 6-Compatible Color Tables"

You can define your own color tables via multi-column waves: DisplayHelpTopic "Color Table Waves".

In reply to by kaikin

The viridis color table is available for python here.

Copy/paste the color table data into a text editor, find & replace the brackets, save and load into igor as delimited text to produce three waves. Then execute:

make /W/U/N=(256,3) viridis
viridis[][0]=wave0[p]*65535
viridis[][1]=wave1[p]*65535
viridis[][2]=wave2[p]*65535
make foo=x
display foo
ModifyGraph lsize=5, zColor(foo)={foo,*,*,ctableRGB,0, viridis}

 

Viridis is installed with Igor 8.02 in the "C:\Program Files\WaveMetrics\Igor Pro 8 Folder\Color Tables\" folder.

Open the ColorTableWavesHelp.ihf file to get one-click access to a wide variety of pre-built color table waves. See the attached photo.

Viridis in Igor.png

In reply to by sjr51

So many useful comments!  Great that Viridis is in Igor 8, but I am using Igor 7 for now. 

sjr51 wrote:

I posted this snippet last year which might be useful

https://www.wavemetrics.com/code-snippet/cet-perceptually-uniform-color-maps

This is an amazing piece of work by Peter Kovesi, very understated by sjr51. Thank you for programming it in Igor.  It would be nice to see these in the Igor Color Tables folder too!

I rescaled these to Igor's weird 0-65535 range.

They'll ship with Igor 9 in the Igor Pro Folder's Color Tables:SciColMaps subfolder.

SciColMaps.zip

In reply to by JimProuty

I had actually edited my post and fixed the files to the correct range once I realized they weren't working!

I let the author of the scientific colormaps know that you will be including them in the next version.