DistColorFun: Creates a color distance function

Description Usage Arguments Value Examples

View source: R/colorpatch_impl.R

Description

Creates a color distance function

Usage

1
DistColorFun(color.space = "LAB")

Arguments

color.space

Color space to be used (see colorspace::color)

Value

A function mapping two color values of a color class colorspace::color to a numeric value.

Examples

1
2
3
4
5
6
library(colorspace)
library(colorpatch)
fn <- DistColorFun("LUV")
a <- sRGB(1,0,0)
b <- sRGB(0.8,0.1,0)
my.distance <- fn(a,b)

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