The target color.
If enabled, the alpha will be multiplied instead of
replaced. This allows the original opacity to be maintained or just
tweaked instead of replacing it entirely by a static value, which means
that fade animations will still work correctly, whereas they may not in
some cases if it is replaced. Defaults to true
.
If enabled, this will make the function multiply the
target color by the brightness of the original color. Defaults to true
.
If enabled, this will force the function to maintain the
scale of the original color. So, if the original color has values greater
than 1, the target color will be multiplied by the highest value. This is
ignored if keepBrightness
is enabled. Defaults to true
.
Creates a recolor function that replaces primary colors with the given color.
Secondary color properties will be replaced with white.
Some "tricks" are used to keep opacity animations and the general brightness similar to the original color. These can be turned off by passing
false
formultAlpha
,keepBrightness
, andkeepScale
. If these are all disabled, the primary color will be replaced with the target color without any modifications to it.