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.
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
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.
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.
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.
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.
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.
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.
For some reason I am fixated on the role of colors in Data Visualization. What do you think?