Description Usage Arguments Value Examples
Get the luminance of a color vector.
1 | get_luminance(x, na.rm = FALSE)
|
x |
a any type color string or a javascript color object specifying. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
Returns the perceived luminance of a color, from 0-1 as defined by Web Content Accessibility Guidelines (Version 2.0).
1 2 3 | get_luminance("{ r: 80, g: 45, b: 20 }")
get_luminance("blue")
get_luminance("HSL(0.2, 0.9, 0.1)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.