View source: R/EnrichmentSpiralize.R
adjust_color_tone | R Documentation |
This function adjusts the saturation and luminance of a given color. It works by converting the color from RGB to Luv color space, applying the scaling factors to the saturation and luminance, and then converting it back to RGB.
adjust_color_tone(color, saturation_scale, luminance_scale)
color |
A color in hexadecimal format (e.g., "#FF0000") or a valid R color name. |
saturation_scale |
Numeric, the scaling factor for saturation (values < 1 decrease saturation, values > 1 increase saturation). |
luminance_scale |
Numeric, the scaling factor for luminance (values < 1 darken the color, values > 1 lighten the color). |
Returns a color in hexadecimal format adjusted according to the provided scales.
adjusted_color <- adjust_color_tone("#FF0000", saturation_scale = 0.8, luminance_scale = 1.2)
print(adjusted_color)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.