DistColorFun {colorpatch}R Documentation

Creates a color distance function

Description

Creates a color distance function

Usage

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

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

[Package colorpatch version 0.1.2 Index]