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.


HSL (hue, saturation, luminosity)

Return data type: dual


Argument Description
hue, saturation, luminosity hue, saturation, and luminosity component values ranging between 0 and 1.
Note: All 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).

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

Coloring a visualization

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?