LinColorSpace: Creates a linear color space between two colors

Description Usage Arguments Value Examples

View source: R/colorpatch_impl.R

Description

Creates a linear color space between two colors

Usage

1
LinColorSpace(color1, color2, n.out)

Arguments

color1

the first color (must be of the class colorspace::color)

color2

the second color (must be of the class colorspace::color)

n.out

number of output colors

Value

a palette

Examples

1
2
3
4
5
6
7
library(colorspace)
library(colorpatch)
pal <- LinColorSpace(sRGB(0,1,0), sRGB(0,0.1,0), 32)
pal <- append(pal, sRGB(0,0,0))
pal <- append(pal, LinColorSpace(sRGB(0.1,0,0), sRGB(1,0,0), 32))
PlotUniformity(pal)
print(pal)

colorpatch documentation built on May 1, 2019, 10:28 p.m.