Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More

Color Logic – loading multiple Color schemes

Creator
Creator

Color Logic – loading multiple Color schemes

Appropriate use of color in an application can not only improve its appeal but help in its adoption and understanding. QlikView provides the flexibility to define colors for many elements but in doing so it can be tricky to keep track of what colors have been used, and a lengthy process to change the palette if a new scheme is required.

Imagine how great it would be to change the palette by simply loading your palette and selecting the required theme from a list box? By defining the colors by labels and defining the values in the load you wont have to look up previously used RGB settings or change every object when you want to change the scheme. This is a really simple method which can be extended once you’re used to it.

This is how it’s done

Img1.png

  • Create an Excel Sheet with required RGB or ARGB values against each of the Color Labels you want to use. I specify Colors1-18 for the charts and some basics such as Caption Colors, Highlights, BarBackgrounds. I use the HidePrefix ‘_’. I also prefer to define the Theme Names as columns (easier for copy/paste from palette creation websites like IWantHue) and transpose during the Load.
  • Include your ColorTheme load in the script.  Remember to use Transpose to switch column/row if necessary. Set HidePrefix=’_’ so these colors don’t clutter your field listing.

Img2.png

  • Make your _ThemeName list box available (usually on a hidden sheet) and ensure there’s Always One Selected Value
  • Use your colors in your application as Calculated values with the easy terminology $(=_CaptionColor)
  • I’ve used the Advanced Color Map in the chart to define all the colors as calculated values. Remember to update your default so you can Retrieve it anytime

Img3.png

  • Don’t forget the ability to double-click on Format Painter to keep it active whilst you update all your other objects to utilize the calculated colors you’ve just setup

That’s it!  It takes less time than you think (certainly no more than typing in RGB values). And once established you can enjoy seeing your apps in a new light at the flick of a selection.

Img4.png

Extending this to multiple palettes

Once established you can have a number of palettes loaded and use Set Analysis or setup Alternate States (my preferred method) to help you pick colors from the required scheme

$(=$(=only({<_ThemeName={'BlueTheme'}>}_Dark)))

$(=$(=only({BlueTheme}_Dark)))

Color…Fast

Having a range of palettes available without having to redefine them can dramatically improve your productivity as there is no need to constantly lookup required colors.

You can set different themes for intensity, such as Dark, Medium, Light so that the same colors can be referenced with differing saturation. This is useful when you want to keep colors consistent across dimensions but use the higher intensity for fine point charts or thin bars where they would be difficult to see otherwise, medium intensity for bars or to highlight values, and light when the data is supportive but color still has meaning.

You can use them to quickly pick out the correct colors for the ColorMix wizard, perhaps to setup TeamA ColorMixed from Dark to Light in the {BlueTheme} but use {RedTheme} for TeamB.

It becomes a simple matter of picking your palette and the reference, rather than searching for the RGB value.

Attachments
Comments
Creator
Creator

Hi Victor,

You can use this technique in Qlik Sense also and use Colors Custom / By expression from the Properties panel. You can simple use any of the Color functions or Hex values in the expression. e.g. 'ARGB(100,255,93,25)' or '#C4D600'

I would also take a look at the fantastic ColorStyler by jsn available on branch.qlik.com

0 Likes
Partner
Partner

Hi everyone, 

 

I am totally new to QlikView and need to change the colorset of an existing  QlikView document   projectxx.qvw with lots of pages and graphs and tables (QlikView for Windows Version 11.20.xxx 64 bit Edition) .

Can someone show how to implement the tutorial step by step with screenshots.  Thanks in advance.

Regard

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2014-08-05 02:18 AM
Updated by: