Skip to contents

Compute color distance

Usage

color_distance(x, y)

Arguments

x

num/chr A Named vector of CSS hex or rgb/rgba color

y

num/chr A Named vector of CSS hex or rgb/rgba color

Value

num A representation of the distance for comparison with other distances

Examples

color_distance(c(a = "rgba(111,96,140,1)"), c("#12B4D3", "green"))
#>                a
#> #12B4D3 2080.713
#> green   3816.264