HSL function

Microsoft Office ShapeSheet

HSL function

See also

Returns a value representing an index in the document's color palette. It specifies a color by its hue, saturation, and luminosity components.

Syntax

HSL(hue,saturation,luminosity)

hue

The color's hue, expressed as a number in the range 0 to 239, inclusive, or an expression that evaluates to such a number.

saturation

The color's saturation, expressed as a number in the range 0 to 240, inclusive, or an expression that evaluates to such a number.

luminosity

The color's luminosity, expressed as a number in the range 0 to 240, inclusive, or an expression that evaluates to such a number.

Remarks

If the color returned by the function does not already exist in the current document's color palette, it is added to the document's list of available colors.

The following table lists some standard colors and their hue, saturation, and luminosity values.

Color

Hue value

Saturation value

Luminosity value

Black

160

0

0

Blue

160

240

120

Green

80

220

120

Cyan

120

240

120

Red

0

240

120

Magenta

200

240

120

Yellow

40

240

120

White

160

0

240

Example 1

HSL(160,240,120)

Returns the index for the color blue.

Example 2

HSL(HUE(FillForegnd),SAT(FillForegnd),MIN(LUM(FillForegnd)+100,240))

Returns the index for a color that mirrors the fill foreground color with increased luminosity.