Skip to contents

Darken a color by proportionally reducing RGB values while maintaining the color's hue and saturation characteristics.

Usage

darken_color(color, factor = 0.4, method = "proportional")

Arguments

color

input color in hex format

factor

darkening factor (0-1), where 0 is no darkening and 1 is maximum darkening

method

method for darkening: "proportional" (default) or "gradient"

Value

darkened color in hex format