ametrine: Create a colorblind-safe vector of 'n' quasi-isoluminent...

Description Usage Arguments Details Value See Also Examples

View source: R/ametrine.R

Description

Create a colorblind-safe vector of n quasi-isoluminent colors.

Usage

1
2
ametrine(n = 256, mincolor = NULL, maxcolor = NULL, invert = FALSE,
  alpha = 1)

Arguments

n

the number of colors to be in the palette.

mincolor

a color with which to replace the lower end of the scale.

maxcolor

a color with which to replace the upper end of the scale.

invert

logical indicating whether the palette should be inverted.

alpha

the alpha transparency for the palette.

Details

The colormap is almost isoluminent and perceived by those with a red-green color perception deficiency as a roughly linear ramp between blue and yellow. However, the colormap has been enriched with a red control point for those with normal color vision. In order to improve contrast, this colormap is slightly unbalanced in luminence, unlike isolum.

Value

A character vector of color names. This can be used either to create a user-defined color palette for subsequent graphics by palette(cv), a col = specification in graphics functions or in par.

See Also

palettes and colors.

Examples

1
2
3
require(graphics)
# A color wheel
pie(rep(1,12), col=ametrine(12))

morgenstemning documentation built on May 2, 2019, 2:07 a.m.