Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

user-defined color pallete

Hi,

I'd like to set a user-defined color pallete based on 100 rgb colors and use it throughout my QV-document.

Is it possible to set a default color pallete in script while loading the data?

I'd like to replace the default QV-colours (with numbers from 1 to 100) to my corporate colors.

Thank you in advance,

Larisa

3 Replies
oknotsen
Master III
Master III

As far as I know, there are only 18 colors that you can define. You can set the (using the color tab of the chart).

If you now load make sure the values are loaded in the right order, you can effectively set the colors for each value.

Alternatively (but never done this myself) you can load the RGB value (as one number or 3 numbers) as a value in your data model and read those into an expression that will than result in the related color.

May you live in interesting times!
Anonymous
Not applicable
Author

This might be what Onno means, you could always define your colors as variables and load these into QlikView. I would probably define my 100 RGB codes in a text file and then use an include statement in the script to load them.

LET vLightGreen = RGB(187,216,84);
LET vMysteryBlue = RGB(121,165,212);

And so on...

This wont create a palette so you will have to manually assign the variables but you can reuse the text file in multiple Qlikview documents. Maybe not what you wanted but as Onno mentioned as far as I know we can only pre-define 18 colors in the actual palette

Anonymous
Not applicable
Author

Hi,

The point is that in my chart I am using the function color(FieldIndex(‘Brand’,Brand)) to select color n from the palette.

Is it possible to define LET variables (e.g. 100 LET variables with defferent colours) as you suggested and then make color+FieldIndex fuction refer to these LET variables?

Thank you in advance,

Larisa