adjust_lightness¶
- mdhelper.plot.color.adjust_lightness(colors: str | tuple[float] | list[str | tuple[float]], amount: float) tuple[float] | list[tuple[float]] [source]¶
Adjusts the lightness of colors.
- Parameters:
- colorstr, tuple, or list.
The colors to adjust. A single color can be specified as a tuple of normalized RGB values or a string containing its name or a hexadecimal value. Multiple colors can be provided in a list.
Examples:
"aquamarine"
,"#080085"
,(0.269, 0.269, 0.269)
.- amountfloat
The amount to adjust the luminosity by. A value betwen \(0\) and \(1\) darkens the color, while a value greater than \(1\) lightens the color.
- Returns:
- colorstuple or list
The adjusted colors.