Notatka
Dostęp do tej strony wymaga autoryzacji. Może spróbować zalogować się lub zmienić katalogi.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
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.