contrast: Calculates the minimum contrast between col and the colors...

Description Usage Arguments Value Examples

Description

Calculates the minimum contrast between col and the colors specified in ...

Usage

1

Arguments

col

The color we want to compare. Hexcode, c(r,g,b), color name as character and "color" class object are all supported.

...

All other colors that col will be compared to. Hexcode, c(r,g,b), color name as character and "color" class object are all supported.

Value

A number between 0 and 1, representing a measure for contrast.

Examples

1
2
3
contrast("red", "blue")
contrast("red", "blue", "black", "green", "white")
contrast("blue", list("#000000", "brown", c(255, 0, 255), "pink", c(0, 128, 176)))

dpcarballo/coloR documentation built on June 1, 2019, 8:14 p.m.