Color functions

These functions can be used in expressions associated with setting and evaluating the color properties of chart objects, as well as in data load scripts.

Note: Qlik Sense supports the color functions qliktechblue and qliktechgray for backwards compatibility reasons, but use of them is not recommended.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

Pre-defined color functions

The following functions can be used in expressions for pre-defined colors. Each function returns an RGB color representation.

Optionally a parameter for alpha factor can be given, in which case an ARGB color representation is returned. An alpha factor of 0 corresponds to full transparency, and an alpha factor of 255 corresponds to full opacity. If a value for alpha is not entered, it is assumed to be 255.

Color function RGB value
black ([alpha]) (0,0,0)

blue([alpha])

(0,0,128)

brown([alpha])

(128,128,0)

cyan([alpha])

(0,128,128)

darkgray([alpha])

(128,128,128)

green([alpha])

(0,128,0)

lightblue([alpha])

(0,0,255)

lightcyan([alpha])

(0,255,255)

lightgray([alpha])

(192,192,192)

lightgreen([alpha])

(0,255,0)

lightmagenta([alpha])

(255,0,255)

lightred([alpha])

(255,0,0)

magenta([alpha])

(128,0,128)

red([alpha])

(128,0,0)

white([alpha])

(255,255,255)

yellow([alpha])

(255,255,0)

Examples and results:  

Examples Results

Blue()

RGB(0,0,128)

Blue(128)

ARGB(128,0,0,128)

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?