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

contrast-theoryR Documentation

Get the intensity and/or luminance of a color

Description

Get the intensity and/or luminance of a color

Usage

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

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

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


satijalab/seurat documentation built on May 11, 2024, 4:04 a.m.