Lighten
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Lighten
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Returns the color with the lightness component decreased by a percentage, given as a decimal number between 0 and 1.
Function signature
LIGHTEN(color: String, lightnesspercentage: Number) => String
Parameter | Description |
---|---|
Color | Color |
Lightness percentage | Percentage to increase lightness (0...1) |
Examples
Formula | Return value |
---|---|
LIGHTEN("#000", 0.5) |
rgb(128,128,128) |
LIGHTEN("rgb(10, 20, 40)", 0.5) |
rgb(91,132,214) |
LIGHTEN("hsl(80, 20%, 40%)", 0.5) |
rgb(231,235,225) |
LIGHTEN("red", 0.2) |
rgb(255,102,102) |
Was this article helpful?