FAQ

Ferret Color Palettes

Ferret Color Palettes

 

Question:

How can I find a good color palette for my plot?

Example: 

Custom color palettes for ocean-temperature, values centered around zero, gray-scale, and customized for topography/bathymetry.

a  map plot drawn with four color palettes.

The above illustrates several palettes used to plot SST and topography. Here is the Ferret script:

! Plot sst
USE coads_climatology
SET REGION/L=1
 
! The ocean-temp palette
SET VIEW ul
FILL/NOLABELS/PALETTE=ocean_temp sst; GO land
 
! plot temperature minus mean with a centered palette
SET VIEW UR
FILL/NOLABELS/PALETTE=white_centered sst - sst[x=@ave,y=@ave]; GO fland
 
! use a greyscale paletete
SET VIEW LL
FILL/NOLABELS/PALETTE=greyscale sst; GO land
 
! plot a relief map using the land_sea palette
USE etopo120
SET VIEW lr 
FILL/NOLABELS/PALETTE=land_sea rose

Explanation:

A number of palette files are available with Ferret. They are designed to highlight different kinds of data fields and to allow sets of plots to have a standard appearance. Some trial and error may be necessary to choose the palette that looks best on a given printer or other output device. A variety of palette files are illustrated below.

See the Ferret Users Guide, the Section on the PALETTE command, and in the section about customizing plots and palette creation, for more on specifying a palette with the plot commands, and about the different kinds of palettes. There is also a palette_demo.jnl script about the different kinds of palettes.
 

In the scientific graphics community, there is much discussion of best practices with color palettes. Here are some references which discuss the shortcomings of rainbow palettes, and good alternatives. Some of these alternatives are included in the Ferret distribution and are discussed in the FAQ's listed below
http://www.climate-lab-book.ac.uk/2014/end-of-the-rainbow/
A Better Default Colormap for Matplotlib, https://youtu.be/xAoljeRJ3lU

 

Also see these related FAQ's,

Here is a table showing a range of available palettes with examples. For the Percent palettes, a range of colors is shown.The Levels and Values palettes are shown with examples from datasets to point out their advantages.

Palette name Description Type of Palette Example Plot
default The default palette; The viridis palette percent
viridis_palette_img.png

 

rainbow The rainbow palette percent
rainbow_palette_img.png

 

ocean_temp Shows range of ocean temperature by value, so plots with different ranges of values will have the same colors for given temperatures. These two plots are the same except for the region. The same color represents the same temperature in both. value
comparison of by-value palette ocean_temp

 

dark_land_sea For topography/ bathymetry plots. Brown and green on land, blue for sea percent
dark_land_sea_palette_img.png

 

land_sea A lighter palette for topography/ bathymetry plots percent
land_sea_palette_img.png

l

 

ocean_blue A range of blues for bathymetry plots percent
ocean_blue_palette_img.png

 

dark_terrestrial A range of green and brown for topography plots percent
dark_terrestrial_palette_img.png

 

terrestrial A lighter palette for topography plots. percent
terrestrial_palette_img.png

 

modulo A palette whose colors on either end match percent
modulo_palette_img.png

 

inferno inferno palette, based on matpltlib and R palettes percent
inferno_palette_img.png

 

magma magma palette, based on matpltlib and R palettes percent
magma_palette_img.png

 

cmocean_algae algae from cmocean perceptually-uniform colormaps percent
cmocean_algae_palette_img.png

 

cmocean_amp amp from cmocean perceptually-uniform colormaps percent
cmocean_amp_palette_img.png

 

cmocean_balance balance from cmocean perceptually-uniform colormaps percent
cmocean_balance_palette_img.png

 

cmocean_curl curl from cmocean perceptually-uniform colormaps percent
cmocean_curl_palette_img.png

 

cmocean_deep deep from cmocean perceptually-uniform colormaps percent
cmocean_deep_palette_img.png

 

cmocean_delta delta from cmocean perceptually-uniform colormaps percent
cmocean_delta_palette_img.png

 

cmocean_dense dense from cmocean perceptually-uniform colormaps percent
cmocean_dense_palette_img.png

 

cmocean_gray gray from cmocean perceptually-uniform colormaps percent
cmocean_gray_palette_img.png

 

cmocean_haline haline from cmocean perceptually-uniform colormaps percent
cmocean_haline_palette_img.png

 

cmocean_ice ice from cmocean perceptually-uniform colormaps percent
cmocean_ice_palette_img.png

 

cmocean_matter matter from cmocean perceptually-uniform colormaps percent
cmocean_matter_palette_img.png

 

cmocean_oxy oxy from cmocean perceptually-uniform colormaps percent
cmocean_oxy_palette_img.png

 

cmocean_phase phase from cmocean perceptually-uniform colormaps percent
cmocean_phase_palette_img.png

 

cmocean_solar solar from cmocean perceptually-uniform colormaps percent
cmocean_solar_palette_img.png

 

cmocean_speed speed from cmocean perceptually-uniform colormaps percent
cmocean_speed_palette_img.png

 

cmocean_tempo tempo from cmocean perceptually-uniform colormaps percent
cmocean_tempo_palette_img.png

 

cmocean_thermal thermal from cmocean perceptually-uniform colormaps percent
cmocean_thermal_palette_img.png

 

cmocean_turbid turbid from cmocean perceptually-uniform colormaps percent
cmocean_turbid_palette_img.png

 

rainbow_by_levels A variety of colors assigned by level: each level gets one color. The LEVELS qualifier is used to specify six levels for the first plot and eighteen for the second. level
rainbow_by_levels.png

 

rnb2 Another rainbow of colors with fewer greens percent
rnb2_palette_img.png

 

saz2 Yet another rainbow of colors percent
saz2_palette_img.png

 

light_rainbow Similar to rainbow, but with washed-out lighter colors percent
light_rainbow_palette_img.png

 

broad Designed to distinguish levels over a broad range percent
broad_palette_img.png

 

no_blue Palette with no blue tones percent
no_blue_palette_img.png

 

no_green Palette with no green tones percent
no_green_palette_img.png

 

no_red Palette with no red tones percent
no_red_palette_img.png

 

low_blue Palette with low amount of blue percent
low_blue_palette_img.png

 

low_green Palette with low amount of green percent
low_green_palette_img.png

 

low_red Palette with low amount of red percent
low_red_palette_img.png

 

centered Distinguishes values above and below the middle level; warm colors above and cool colors below. percent
centered_palette_img.png

 

centered diff Distinguishes values above and below the middle level; bright colors with warm colors above and cool colors below. percent
centered_diff_palette_img.png

 

white_centered

Another centered palette with white as the central color.

A variation on this is to make a copy of the palette file and create a similar one where white is replaced by very light gray, to distinguish it from the white of missing-data.

percent
white_centered_palette_img.png

 

grayscale (also greyscale) Series of grays percent
grayscale_palette_img.png

 

inverse_grayscale
(and inverse greyscale)
With high and low reversed percent
inverse_grayscale_palette_img.png

 

bluescale

Series of blues.  See also redscale, greenscale,reverse_bluescale, and so forth,

which are the same palettes with high and low reversed.

percent
bluescale_palette_img.png

 

Single colors

black
blue
blue_light
blue_dark
brown
brown_light
brown_dark
cyan
cyan_light
cyan_dark
gray
gray_light
gray_dark
grey
grey_light
grey_dark
green
green_light
green_dark
magenta
magenta_light
magenta_dark
orange
orange_light
orange_dark
pink
pink_light
pink_dark
purple
purple_light
purple_dark
red
red_light
red_dark
tan
tan_light
tan_dark
violet
violet_light
violet_dark
white
yellow
yellow_light
yellow_dark

One color in the palette. These are useful for colorbars, filling between curves, making backgrounds, and filling polygons to make different colored dots on a plot, as in marking station locations. For examples see the FAQ: Howcan I fill between two curves? and the Ferret v5.6 release notes  
for instance, violet
violet_palette_img.png

 

or to color symbols on a map:

map_with_poly.png

go polymark poly/over/line/pal=pink xpts,ypts,,square
go polymark poly/over/line/pal=orange_dark xp,yp,,circle