Export (0) Print
Expand All
Expand Minimize

HSL Function

Published: July 16, 2012

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

HSL(hue,saturation,luminosity)

Parameters

Name

Required/Optional

Data Type

Description

hue

Required

Number

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

Required

Number

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

Required

Number

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

Return Value

Number

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

0

0

24

Blue

160

240

120

Green

80

240

120

Cyan

120

240

120

Red

0

240

120

Magenta

200

240

120

Yellow

40

240

120

White

0

0

240

HSL(160,240,120)

Returns the index for the color blue.

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.

Community Additions

ADD
Show:
© 2014 Microsoft