ret_lum | R Documentation |
Modifies the brightness of a color by multiplying its RGB components by a specified factor.
Mostly for internal usage inside lum_0_100 function.
ret_lum(hexCol, rgbFact)
hexCol |
Character. The color to adjust, specified in hexadecimal format (e.g., "#FF5733"). |
rgbFact |
Numeric. The luminosity factor : - use a factor between 0 and 1 to decrease luminosity - use a factor >1 to increase it The final Brightness value will be maintained between 0 and 1. |
A modified hex color in hexadecimal format.
# Example 1: Lightening a color
ret_lum("#FF5733", 1.5) # Returns a lighter version of the input color
# Example 2: Darkening a color
ret_lum("#FF5733", 0.7) # Returns a darker version of the input color
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.