Qlik Sense Color Functions

Last updated on Nov 16 2021
Darayus Lamba

Table of Contents

Qlik Sense Color Functions

ARGB

The ARGB() function is employed to line a code to the info points in tables and charts. the colours are defined by distinct components within the function for red (R), green(G), blue(B) and an alpha value (A) which decides opaqueness.
Syntax:
1. ARGB(alpha,r,g,b)
Where the alpha may be a value within the range of 0 to 255 which defines the opacity of the colour . If you decide on the alpha value to be 0 then it’s interpreted as transparent and if it’s 255 then it’s fully opaque. Any value between these two will decide the degree of opacity accordingly.
The value for r decides the colour component for red, g for green and b for blue. the worth returned when this function is employed is in dual format .
For example, using the argb on a map where colored spots define different levels of call priorities.

1. if([Call Priority]='Must Call', argb(175,242,0,0), //this will return red dot
2. if([Call Priority]='Need To Call',argb(175,254,197,80), //this will return yellow
3. if([Call Priority]='Recent Call', argb(175,111,176,29), //this will return green
4. if([Call Priority]='Not Targeted',argb(175,190,190,190) ) //this will return grey

ARGB functions are used especially when the opacity of the coloured object must be handled. this is often needed much in maps, scatter charts etc. where data values are represented as points and by reducing their opacity using ARGB() one can manage such a chart where many data points are overlapping one another . If the opacity is low, and therefore the data points are more transparent then , overlapped data points can easily be seen separately. The argb value also can be interpreted within the sexadecimal notation . as an example , the argb value for light green is that the number 4278255360, which in sexadecimal notation is FF00FF00. Where the primary two FF represents the alpha factor (255), and next two 00 denotes the quantity of red component, subsequent FF denotes green component and last 00 denotes the blue component.

RGB

RGB() function is analogous to the ARGB() function, the sole difference being that when RGB() is employed the alpha factor value is fixed and you can’t adjust the opacity of the colour .
Syntax:

1. RGB(r, g, b)
Where the r, g, and b are the places where values for the three color components (red, green and blue) are mentioned. There are predefined values for a few of the colours given below. it’s interpreted as rgb() values if the alpha factor isn’t laid out in the colour function. for instance , if we write Blue() then the result are going to be an RGB value RGB(0,0,128) but if you write Blue(128) then 128 are going to be the worth defining opacity (alpha factor) and can end in an ARGB value, ARGB(128,0,0128).

Color function RGB value
Black ([alpha]) (0,0,0)
Blue([alpha]) (0,0,128)
Brown([alpha]) (128,128,0)
Cyan([alpha]) -128,128
Darkgray([alpha]) -128,128,128
Green([alpha]) (0,128,0)
Lightblue([alpha]) (0,0,255)
Lightcyan([alpha]) -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)

When an RGB value is written in sexadecimal notation then the primary two values i.e. FFs are fixed for opacity (255, opaque). RGB() function is employed mostly in tables and charts where opacity isn’t needed to be adjusted.

HSL

The HSL() function is employed to line the components of a color like hue, saturation and luminosity. The values for the three range between 0 to 1. The syntax for an HSL() function is given below.
HSL(hue, saturation, luminosity)
For example, the HSL value for an rgb() function RGB(0,255,0) are going to be HSL(0.33,1,0.5), this may set a particular degree of hue, saturation and luminosity for the respective color.

Qlik Sense Color

The Color() function returns the numeric value of a color utilized in the code. the worth is stored in dual form i.e. both alphabetically(text) and numerically. The text representation is within the sort of rgb(r, g, b) which, by using the Color() function gives the numeric values of the red, green and blue numeric components.
Syntax:

1. Color(n)
For example, if we write Yellow(), then the colour function will return rgb(255,255,0) which is that the numeric interpretation of the colour components (r, g, b) of Yellow color.

Colormix1 Qlik Sense

The Colormix1() function is employed to combine two colors which makes a selected shade.
Syntax:

1. Colormix1(Value, ColorZero, ColorOne)
Where Value may be a real between 0 and 1. If Value = 0 ColorZero is returned and if Value = 1 ColorOne is returned. And, if it’s within the range of 0 < Value< 1 the acceptable intermediate shading is returned.
ColorZero may be a valid RGB color representation of a color, it’s one among the 2 colors that we would like to combine and makes the lower end of the interval.
ColorOne is additionally valid RGB color representation which is that the second of the 2 colors to be mixed. It marks the upper end of the two-color range or interval.
For example:
Colormix1(0.5, red(), blue())
Returns- ARGB(255,64,0,64) (purple)
In this example, we mixed two colors red and blue with the blending value 0.5 which returns the numeric values within the ARGB() function and specify the resultant color from mixing red and blue i.e. purple.

Colormix2 in Qlik

The Colormix2() function is employed to combine two colors to form a color gradient. This function also specifies an intermediate color for the central(0) value or position.
Syntax:
1. Colormix2(Value, ColorMinusOne, ColorOne[ , ColorZero])
The extent of grading of the mixed color is defined by the worth which lies between -1 and 1. If the worth = -1 then first color i.e. ColorMinusOne is returned. If Value = 1 then second color i.e. ColorOne is returned. And, if the worth lies between -1 and 1, then ColorZero is returned.
The ColorMinusOne may be a valid RGB color which makes the lower end of the colour interval.
The ColorOne too may be a valid RGB color representation which makes the upper end of the colour range.
The ColorZero is an optional valid RGB color which is assigned to the central position of the range.
For example,
ColorMix2(0, red(), green(), brown())
This will return brown because the worth is 0. If the worth was -1 or 1, then red or green would are returned respectively.

SysColor in Qlik

This function returns the ARGB value of the windows system colour scheme . Here nr is that the color parameter utilized in the Windows API.
Syntax:
1. SysColor(nr)

ColorMapHue in Qlik Sense

The ColorMapHue() hue function returns the ARGB color value or color name of from the range or gradient of hue component within the HSV color model. the worth of hue component lies between 0 to 1 (including 0 and 1). The colormap ranges from red passes to many other colors like yellow, green, cyan, blue, magenta, then returns back to red. That, if your x value is between 0 and 1 then likelihood is that that the hue component returned are going to be from the center colors like green, cyan, blue, magenta. If the x value is near 0 or 1 then the hue component are going to be reddish.
Syntax:
1. ColorMapHue (x)
Where x is any value from 0 to 1 defining the hue component from the colormap.

ColorMapJet in Qlik Sense

The function ColorMapJet() returns the ARGB color value or name for the colormap range ranging from blue, then passing through cyan, yellow and orange, and returns to red. the worth of x must be specified as a worth between 0 and 1. that’s if you decide on the worth of x at 0.5 or something, you’ll get a color which may be a shade of yellow. If you go towards 0 then the colour shade will become bluish and if you progress towards 1 then the colour shade will get reddish.
Syntax:
1. ColorMapJet (x)

So, this brings us to the end of blog. This Tecklearn ‘Qlik Sense Color Functions’ blog helps you with commonly asked questions if you are looking out for a job in Qlik Sense BI. If you wish to learn Qlik Sense and build a career in Business Intelligence domain, then check out our interactive, Qlik Sense Certification Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/qlik-sense-certification-training/

Qlik Sense Certification Training

About the Course

Qlik Sense is a revolutionary Business Analytics tool to come from the Qlik stables. It provides powerful self-service analytics that are readily deployable through interactive and personalized dashboards, data visualization techniques and insightful reports. By the end of this Qlik Sense online training, you will be able to perform key skills of the self-service BI tool – Qlik Sense, such as self-service analytics, write data load scripts, data discovery, create dashboards, develop and share apps, create reports, and design and build data visualizations. All these skills will enable you to clear the Qlik Sense certification exam.

Why should you take Qlik Sense Training?

  • The average annual pay for a Qlik Sense Professional is $101,871. -Indeed.com.
  • HSBC, Alstom, Chrysler, Citibank, Accenture and many other MNC’s worldwide use Qlik Sense BI and it has a market share of around 5% globally.
  • By the end of 2020, the market is expected to touch USD 22.8 billion as modern BI and analytics continue to expand more rapidly, Gartner said in a report.

What you will Learn in this Course?

Introduction and Installation of Qlik Sense

  • Need for self-service Business Intelligence/Business Analytics
  • Installation of Qlik Sense and Qlik Sense Desktop

Qlik Sense Features

  • Qlik Data indexing engine
  • Data dimensions relationships
  • Types of Data Loading
  • Types of Concatenation

Data Modelling

  • Qlik Sense data architecture
  • Understanding QVD layer
  • Converting QlikView files to Qlik Sense files
  • Incremental Load
  • Scripting
  • Create Master Calendar

Advance Data Modelling

  • Qualify and unqualify
  • Joins
  • Keep
  • Cross Table
  • Let Vs Set
  • Calendar Table Creation

Qlik Sense Enterprise

  • Various Functions
  • Create QVD Files
  • Read Data for QVD Files
  • Create QVD’s
  • Create Tier 2 Qlik Sense App

Data Visualization

  • Expressions
  • Variables
  • Extensions
  • Data Visualization

Set Analysis

  • Set analysis in Qlik Sense
  • Use set expression like identifiers, operators, modifiers and comparative analysis

Advance Set Analysis

  • Deploy comparison sets and perform point-in-time analysis

Qlik Sense Storytelling

  • Storytelling feature of Qlik Sense
  • Create a story and playback the story

Qlik Sense Visualization

  • Qlik Sense Charts
  • Advanced Charts
  • Creating Dashboards
  • Real Life Examples

Security

  • Security aspects of Qlik Sense
  • Security rules

Got a question for us? Please mention it in the comments section and we will get back to you.

0 responses on "Qlik Sense Color Functions"

Leave a Message

Your email address will not be published. Required fields are marked *