Utility: QlikView Color Sequence Generator

QlikView Color Sequence - Featured Image - Incremental Rainbow

This is a cool little utility that creates incrementally sequenced RGB colors for your QlikView applications in a few variations. When trying to get “colors in between two colors”, I have traditionally just incremented from the R, G and B coordinates as necessary. That approach is fine except that when the colors are too close together, I find some areas of the resulting scale to be too similar to be discernible as separate, so I started to look for ways to better represent the colors I needed.

QlikView Color Sequence - donut chart with incremental colors that are indescernable

Are the colors pretty? Maybe. Do the colors help bring meaning to the data? Definitely not.

 

The Color Sequence Generator will give you a traditional RGB set of colors, but you also will get XYZ stabilized colors and CIE-L*ab stabilized colors. Both of these methods are supposed to be accurate to the human perception of color.

Download: Color Sequence Generator.qvw

QlikView Color Sequence Generator Screenprint

How To:

Decide how many steps (colors) you want all together.

Select the beginning color and the ending color. You can enter in the RGB code, use the sliders or even use the provided presets. Reload the app to generate the result sets.

QlikView Color Sequence - QlikView Slider used to adjust the start and end colors

Slider used to adjust the start and end colors

The results are generated 3 ways

Traditional RGB:               We simply increment the 3 RGB values to create the desired number of steps between the two colors. This usually provides satisfactory results, although we do not necessarily perceive the colors as equidistant from each other.

QlikView Sequential Colors using traditional RGB method

XYZ Color Space:              By converting the RGB to XYZ Color Space, creating the increments, and then converting back to RGB, another list of colors is generated. Although the XYZ incrementing is supposed to be better, I personally think this method leans on one color or the other too heavily. I am generally not happy with the colors using this method.

QlikView Sequential Colors using XYZ Stabilized incrementaing

CIE-L*ab:             This is the most accurate way of ensuring the colors are perceived equidistant from each other. We convert the RGB to XYZ and then to CIE-L*ab, create the increments and then do the process in reverse. I was happier with this result than the XYZ method.

Finally, you can copy the variable code from whichever set you like and generate the variables in your own app.

QlikView Sequential Colors using CIE_L*ab Stabilized incrementaing

 

Credits:

I was inspired and borrowed freely from a few great apps in the community. I urge you to check out both. Ciaran McGowan’s app focuses on generating a palette of analogous colors given a primary color you select.

Then I found Adam Booth’s app that shows some sequential colors as well as their complements and triads.

 

Extra Resources:

The math and science of color are fascinating on many levels. Here are a few links I used in putting this together that you might enjoy:

You might also be interested in an article I wrote regarding QlikView color increments for a limited number of categories. It would be neat to see an integration of these two approaches.

Assign Colors in QlikView Script – Let’s Do Something Cool with Color

For some reason I am fixated on the role of colors in Data Visualization. What do you think?

1 comment… add one

    Leave a Comment

    Join us at Living QlikView

    Never miss a post.

    We Never Spam. NEVER.

    Show Buttons
    Hide Buttons