Library
Module
Module type
Parameter
Class
Class type
Colormaps with certain characteristics.
val length : t -> int
length m
returns the number of colors in the palette m
.
val gradient : ?interpolate:bool -> t -> Gradient.t
gradient m
returns a gradient constructed from the palette. It only makes sense for sequential and some diverging palettes.
val ty : t -> [ `Seq | `Div | `Qual ]
ty m
says whether the palette is `Seq
uential, `Div
ergent or `Qual
itative.
val blind : t -> [ `Yes | `No | `Maybe ]
blind m
says whether the palette m
is colorblind safe.
val print : t -> [ `Yes | `No | `Maybe ]
print m
says whether the palette m
is print friendly.
val copy : t -> [ `Yes | `No | `Maybe ]
print m
says whether the palette m
is photocopy safe.
val lcd : t -> [ `Yes | `No | `Maybe ]
print m
says whether the palette m
is friendly for LCD screens.
val find :
?ty:[ `Seq | `Div | `Qual ] ->
?blind:[ `Yes | `No | `Maybe ] ->
?print:[ `Yes | `No | `Maybe ] ->
?copy:[ `Yes | `No | `Maybe ] ->
?lcd:[ `Yes | `No | `Maybe ] ->
int ->
t list
find length
return the list of palettes that support the desired properties and having at least length length
. Note that most of the palette have ≤ 12 colors and the longer the palette, the less it will satisfy other properties. For properties selected with `Yes
`No
or `Maybe
, setting `No
(the default) means one does not care, setting `Maybe
selects palettes that maybe (or for sure) satisfy the property and `Yes
selects palettes that satisfy the property for sure.
ty
, if provided, restricts maps to the color scheme:
`Seq
: Sequential scheme`Div
: Diverging scheme`Qual
: Qualitative schemeblind
: the palette should be safe for color blind people.print
: the palette is print friendly.copy
: the palette is photocopy friendly.lcd
: the palette is LCD friendly.val viridis : t
Matplotlib colormaps
These are sequential colormaps (each with 256 colors). You can find more information on this page.
val magma : t
val inferno : t
val plasma : t
Color schemes as described in the paper: Brewer, Cynthia A., Geoffrey W. Hatchard and Mark A. Harrower, 2003, ColorBrewer in Print: A Catalog of Color Schemes for Maps, Cartography and Geographic Information Science 30(1): 5-32.
See also www.ColorBrewer.org
val ylgn : t list
Light yellow to dark green
val ylgnbu : t list
Light yellow to green to dark blue
val gnbu : t list
Light green to dark blue
val bugn : t list
Light blue to dark green
val pubugn : t list
Light purple to blue to dark green
val pubu : t list
Light purple to dark blue
val bupu : t list
Light blue to dark purple
val rdpu : t list
Light red to dark purple
val purd : t list
Light purple to dark red
val orrd : t list
Light orange to dark red
val ylorrd : t list
Light yellow to orange to dark red
val ylorbr : t list
Light yellow to orange to dark brown
val purples : t list
Light to dark purple
val blues : t list
Light to dark blue
val greens : t list
Light to dark green
val oranges : t list
Light to dark oranges
val reds : t list
Light to dark red
val greys : t list
Light to dark gray
val puor : t list
Dark orange to light to dark purple
val brbg : t list
Dark brown to light to dark blue-green
val prgn : t list
Dark reddish-purple to light to dark green
val piyg : t list
Dark magenta to light to dark yellow-green
val rdbu : t list
Dark red to light to dark blue
val rdgy : t list
Dark red to light to dark grey
val rdylbu : t list
Dark red to light yelow to dark blue
val spectral : t list
Dark red, orange, light yellow, green, dark blue
val rdylgn : t list
Dark red, orange, light yellow, yellow-green, dark green
val set1 : t list
Includes bold, readily named, basic colors (such as red, green, blue)
val pastel1 : t list
Lighter version of Set1
val set2 : t list
Includes mostly a mixture colors (such as blue-green, red-orange)
val pastel2 : t list
Lighter version of Set2
val dark2 : t list
Darker version of Set2
val set3 : t list
Medium saturation set with more lightness variation and more classes than Set1
and Set2
.
val paired : t list
Light/dark paris for namable hues
val accent : t list
Include lightness and saturation extremes to accent small or important areas