20 april 2023 Qlik Color Functions Deel dit bericht Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question about Qlik color functions. This question is inspired by QlikWorld in Las Vegas, each answer being a different function to display a color in Qlik. The answers A,B and C, respectively give us black, red, green, resembling the bets you can do at a roulette table. Answer D will instead return Bitmetric purple. And as we all know there are no right answers in gambling, we might advise you to choose answer D, if you want to be sure of your solution ;). Color Functions One of the most striking things in data visualization is of course color. If all dashboards would be gray tones we would quickly not only lose interest, but coloring also makes it possible to pinpoint certain outcomes. Think of highlighting max values, coloring negative values, or as usage with data brushing techniques. Whatever you would like to use it for, Qlik offers various ways to spice up your visualizations with different color functions: (A)RGB Colors in the RGB system are made up as a mix of the three primary colors: Red, Green, Blue. The RGB function utilizes this to return the appropriate color. The range in which a color can be added is from 0 to 255. For example: RGB(255, 0, 0) will add maximum red value, with no green or blue tones. This returns a full red color. RGB(255, 255, 0) will give us full reds and greens, without blues, resulting in yellow. As we can see in Answer C we have also used ARGB. Where the A stands for alpha. This is the opacity of the color, with 0 being fully see through and 255 being completely opaque. In this case it gives us the full green, however if we apply it to the yellow as ARGB(100, 255, 255, 0) we can see that the opacity changes: Hexadecimal Another way to determine color codes is by using hexadecimal number notation. Hexadecimal color coding always consists out of six digits (preceded by a hashtag). The first two digits represent the R(ed), the middle two the G(reen) and the final two the B(lue). In hexadecimal notation ’00’ gives us the least color, with ‘FF’ giving the most. So Answer A, gives us no colors for RGB, representing black. ‘#FFFFFF’ will be the most color resulting in white. ‘#0000FF’ will return blue. The hexadecimal notation can be used everywhere in Qlik where you can use colors, but it is interpreted as a string, so use single quotes. Colormix Another possibility is to add more colors to the mix. Pun intended. With the Colormix1 function it is possible to color an array of values between 0 and 1. It will then return a gradient of those colors. In the table below the following expression is used to calculate the percentage of the max speed per activity compared to the total max speed. Colormix1(Sum([#Max speed (KM/H)]) / Max(TOTAL [#Max speed (KM/H)]) , Red(), Green()) As is visible we determine the bottom value color as red and the top value as green, resulting in the following table, clearly showing the gradient towards the bottom. A bit as a joke we have added the Bitmetric purple color to the colormix. Since we both use the same color for the top and bottom and give the expression value of 0.5, we have that color as a result: Colors() As seen in the colormix explanation it is also possible to have some colors just added by name. In this case the name is also the function. The syntax is Color(n) In which n is the alpha for opacity. The colors which can be used are: 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) Other things to notice There is also a colormix2 function. In this the colorrange goes from -1 to 1, instead of 0 to 1. There are also the color functions qliktechblue() and qliktechgray(). However these are only supported in Qlik Sense for backwards compatibility with QlikView. More from the Bitmetric team Bitmetric Qlik Support Keep your Qlik environment running smoothly with proactive support that prevents issues before they appear. Available on flexible monthly plans. Learn more. Qlik vs Power BI Series See how Qlik and Power BI perform when theory meets reality. Three apps rebuilt, every step examined. Learn more. Friday Qlik Test Prep Qlik Solution Hoe kunnen we je ondersteunen? Barry beschikt over meer dan 20 jaar ervaring als architect, developer, trainer en auteur op het gebied van Data & Analytics. Hij is bereid om je te helpen met al je vragen. Bel ons Mail ons 12 juli 2026 Qlik naar Power BI of Microsoft Fabric migreren: de complete gids (2026) Overstappen van Qlik naar Power BI of Microsoft Fabric is geen gewone migratie, maar een herbouw. In deze gids lees je wanneer overstappen logisch is, wat je kunt hergebruiken en hoe je het traject realistisch aanpakt. Microsoft Fabric Migration Power BI Qlik 1 juli 2026 Migreren naar Qlik Cloud: de complete gids (2026) Elke dinsdag levert Qlik een nieuwe release uit, on-premise wacht je een stuk langer. Toch gaat een migratie naar Qlik Cloud niet over apps overzetten alleen: governance, licentiemodel en beheer veranderen compleet. In deze gids leg ik uit wat je meeneemt, wat verandert, en wanneer je er een partner bij haalt. Governance Migration Qlik QlikView 16 juni 2026 Proactieve Qlik Cloud support is meer dan af en toe bellen hoe het gaat Proactieve support is meer dan af en toe bellen hoe het gaat. Met de Qlik Tenant Check controleren we dagelijks Qlik Cloud omgevingen op risico’s die nog geen incident zijn, maar dat later wel kunnen worden. Qlik Support
12 juli 2026 Qlik naar Power BI of Microsoft Fabric migreren: de complete gids (2026) Overstappen van Qlik naar Power BI of Microsoft Fabric is geen gewone migratie, maar een herbouw. In deze gids lees je wanneer overstappen logisch is, wat je kunt hergebruiken en hoe je het traject realistisch aanpakt. Microsoft Fabric Migration Power BI Qlik
1 juli 2026 Migreren naar Qlik Cloud: de complete gids (2026) Elke dinsdag levert Qlik een nieuwe release uit, on-premise wacht je een stuk langer. Toch gaat een migratie naar Qlik Cloud niet over apps overzetten alleen: governance, licentiemodel en beheer veranderen compleet. In deze gids leg ik uit wat je meeneemt, wat verandert, en wanneer je er een partner bij haalt. Governance Migration Qlik QlikView
16 juni 2026 Proactieve Qlik Cloud support is meer dan af en toe bellen hoe het gaat Proactieve support is meer dan af en toe bellen hoe het gaat. Met de Qlik Tenant Check controleren we dagelijks Qlik Cloud omgevingen op risico’s die nog geen incident zijn, maar dat later wel kunnen worden. Qlik Support