HSL Function
Last modified: March 09, 2015
Applies to: Office 2013 | Visio 2013
In this article
Syntax
Remarks
Example 1
Example 2
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 |