contrast-theory: Get the intensity and/or luminance of a color

Description Usage Arguments Value Source Examples

Description

Get the intensity and/or luminance of a color

Usage

1
2
3
Intensity(color)

Luminance(color)

Arguments

color

A vector of colors

Value

A vector of intensities/luminances for each color

Source

https://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color

Examples

1
2
3
Intensity(color = c('black', 'white', '#E76BF3'))

Luminance(color = c('black', 'white', '#E76BF3'))

Seurat documentation built on Jan. 13, 2021, 7:11 p.m.