Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.29 KB

hsl-function.md

File metadata and controls

63 lines (43 loc) · 2.29 KB
title manager ms.date ms.audience ms.topic f1_keywords ms.localizationpriority ms.assetid description
HSL Function
lindalu
03/09/2022
Developer
reference
Vis_DSS.chm82251438
medium
c9314c39-1d2e-a18f-c01b-8817286099dc
Returns a value representing an index in the document's color palette. It specifies a color by its hue, saturation, and luminosity components.

HSL Function

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 )

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

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
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

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.