DARKEN function

DARKEN(Color, Amount) DARKEN(Color; Amount)

Color

Color or { Color }

The color to darken.

Amount

Number or { Number }

A number between 0 and 100 (inclusive), where 0 means that no modifications should be made and 100 means that the resulting color should be black.

Returns

Color or { Color }

A darkened version of the given color.

Darkens the given color by a specified amount. The implementation uses the Hue-Saturation-Lightness (HSL) color model to linearly decrease the lightness with the given amount. Use LIGHTEN to perform the reverse operation.

This function is Calcapp-specific.

Examples

DARKEN(Color.Red, 20)DARKEN(Color,Red; 20)

Returns a variant of the default red color, which has been darkened by 20 percent.

DARKEN({ Color.Red, Color.Green }, 10)DARKEN({ Color,Red; Color,Green }; 10)

Returns variants of the default red and green colors, which have both been darkened by 10 percent.

DARKEN({ Color.Red, Color.Green }, { 20, 10 })DARKEN({ Color,Red; Color,Green }; { 20; 10 })

Returns variants of the default red and green colors, which have been darkened by 20 and 10 percent, respectively.