OptimizeBiColor {colorpatch}R Documentation

Optimizes a bicolor palette

Description

Optimizes a bicolor palette

Usage

OptimizeBiColor(neg.col.min = colorspace::sRGB(0, 0.01, 0),
  neg.col.max = colorspace::sRGB(0, 1, 0),
  pos.col.min = colorspace::sRGB(0.01, 0, 0),
  pos.col.max = colorspace::sRGB(1, 0, 0), center.col = colorspace::sRGB(0,
  0, 0), n.out = 64, oversampling = 128,
  col.dist.fun = DistColorFun("LAB"), reverse = FALSE)

Arguments

neg.col.min

color representing the negative mininum value

neg.col.max

color representing the negative maximum value

pos.col.min

color for the positive minimum value

pos.col.max

color representing the positive maximum value

center.col

center color which maps to 0 (default: black)

n.out

size of each half-palette

oversampling

the oversampling rate

col.dist.fun

color distance function (default: DistColorFun("LAB")) for optimizing the palette

reverse

shall the palette be searched starting from the minimum color to the maximum (reverse=FALSE) or vice versa - defaults to FALSE

Value

bicolor palette

Examples

pal <- OptimizeBiColor(n.out = 8, oversampling = 32)
PlotUniformity(pal)

[Package colorpatch version 0.1.2 Index]