Across the Rainbow

Inatsu and Hamada (2016, Tenki) proposed a new ideal rainbow colour set as below.

Reference

稲津 將,濱田 篤,2016: 気象学の色遣い~均等色空間を利用したカラーリング~. 天気,63,803–809.

Python programme

GrADS script function

set_rainbow.gsf sets our rainbow colour in grads. Usage: set_rainbow( isep, ista ), where isep is number of separation in rainbow and ista is start number for 'set rgb' in grads.

set_mono.gsf sets the monotone colour in grads. Usage: set_rainbow( r, g, b, isep, ista ), where r is red value of baseline colour, g is green value of baseline colour, b is blue value of baseline colour, isep is number of separation in rainbow, and ista is start number for 'set rgb' in grads.

rgb_lab.gsf transforms RGB to LAB. Usage: rgb_lab( r, g, b, k ), where r is Red for 0-255, g is Green for 0-255, b is Blue for 0-255, k is 1 for L value, 2 for a value, and 3 for b value.

lab_rgb.gsf transforms LAB to RGB. Usage: lab_rgb( L, a, b, k ), where L is L* in CIELAB, a is a* in CIELAB, b is b* in CIELAB, k is 1 for Red, 2 for Green, and 3 for Blue.

Generate monotone colour levels

Enter the number of separation.
Select a base colour from the palette.

Generate rainbow colour levels

Enter the number of separation.

Generate colour-white-colour levels

Enter the number of separation.
Select one base colour.
Select other base colour.