DIM function

DIM(Color, Amount) DIM(Color; Amount)

Color

Color or { Color }

The color to dim.

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 dimmed version of the given color.

Dims the given color by a specified amount. The implementation uses the Hue-Saturation-Lightness (HSL) color model to linearly decrease the saturation and lightness with the given amount, relative to their existing values. Use BRIGHTEN to perform the reverse operation.

This function is Calcapp-specific.

Examples

DIM(Color.Red, 50)DIM(Color,Red; 50)

Returns a variant of the default red color, which has been dimmed by 50 percent.

DIM({ Color.Red, Color.Green }, 50)DIM({ Color,Red; Color,Green }; 50)

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

DIM({ Color.Red, Color.Green }, { 50, 25 })DIM({ Color,Red; Color,Green }; { 50; 25 })

Returns variants of the default red and green colors, which have been dimmed by 50 and 25 percent, respectively.