Skip to main content

HSL - script and chart function

HSL() is used in expressions to set or evaluate the color properties of a chart object, where the color is defined by values of hue, saturation, and luminosity between 0 and 1.

Syntax:  

HSL (hue, saturation, luminosity)

Return data type: dual

Arguments:  

Arguments
Argument Description
hue, saturation, luminosity hue, saturation, and luminosity component values ranging between 0 and 1.
Information noteAll arguments must be expressions that resolve to integers in the range 0 to 1.

If interpreting the numeric component and formatting it in hexadecimal notation, the RGB values of the color components are easier to see. For example, light green has the number 4 278 255 360, which in hexadecimal notation is FF00FF00 and RGB (0,255,0). This is equivalent to HSL (80/240, 240/240, 120/240) - a HSL value of (0.33, 1, 0.5).

Refer to Coloring a visualization to find examples of how to use the color functions in visualizations, as well as details on the visualizations that support color by expression.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!