Skip to content
Analytica > Blogs > Behind the scenes: 5.3 color themes

Behind the scenes: 5.3 color themes

 – Easily change default node styles and improve models with a broader color palette.

Ben here to tell you about my first large project at Lumina — developing new color schemes for the Analytica 5.3 release. One of our primary goals was improving the look and feel of Analytica models and part of achieving that relied upon our color choices. Given both the magnitude and implications associated with this task in combination with my less-than-stellar color sense, I leaned upon a more scientific approach. This article details my findings and how we arrived at a new color palette for Analytica.

For more information, click here. 

Starting point

Based on a suggestion from Lonnie Chrisman (Lumina CTO), my first action was to see what the current industry standard was for software color palettes. Given that Analytica is rather unique, finding direct comparisons wasn’t much of an option. Instead I looked up various diagram types, focusing primarily on the number of colors, which colors, and border styles that were being used. My findings showed that color variation was rather limited, typically averaging around three colors. Additionally I noted that a standard black font was extremely prevalent, lighter colors seemed to be preferred, and that border types were all over the place.

Although I’d learned a little, I was far from reaching any sort of consensus on which colors we should use or how we should apply them. Rather than looking at what the vast majority had been doing, I decided to try and narrow my research to some of the bigger players. Research showed that Viridis had become a sort of industry standard.

Viridis

My first exposure to Viridis was through an R article by Bob Rudis, Noam Ross and Simon Garnier. In it, they talked about the adaption of Viridis to make visually appealing plots that better represented their data and were more readable for those with color blindness, among other qualities. Although our application wouldn’t necessarily be plotting, their focus on using colors to convey information was synonymous with ours.

Though it certainly seemed appealing, I wanted something more concrete to bring back to the team. Because we wanted to only offer what we considered to be good color alternatives, we didn’t want to indiscriminately add color sets. Thus, I needed to really understand why this would be an ideal color set for us. As luck would have it, the aforementioned R article cited a talk by the original creators of Viridis, Nathaniel Smith and Stéfan van der Walt.

The science behind Viridis

I’ll try to be brief when discussing points of the talk both because it was an amazing talk that I highly suggest anyone interested in color theory go check out (after finishing reading this, of course!) and because my interpretation of what these gentlemen spent years working on would not do their hard work justice. Viridis was actually a color set created out of necessity. The creators originally just wanted to update the very popular matplotlib plotting library for Python to a color set made by the folks at MATLAB (programming language). Unfortunately, the color set, named Parula, was not open source. Undeterred, they set out to make their own color set. 

Their primary goals were visual appeal, perceptual uniformity, sequential ordering, and using the widest range of colors possible without compromising the color set for those with color blindness. In order to adhere to these restrictions, they were forced to travel across the color spectrum from blue to yellow by either crossing green or crossing red (not both to avoid those with green-red or red-green color blindness mixing up the two). Though either would have been adequate, their primary choice was green as people generally favored green over red. They proved through various tests how their color set excelled in color distinction and made the software that they used to generate their color sets publicly available so that anyone could generate their own color sets that adhere to similar standards.

Designating colors to nodes

Further research showed that these color sets (Viridis and one of their red versions, Plasma) were in fact becoming a norm and that adopting them into our own color sets only made sense. The challenge now would be to decide which colors would go to which nodes. The first logical step was to look at existing Analytica models to see how often the different types of nodes appear (frequency) and the general flow that these nodes appeared in. Though flow could be very different from model to model and these orderings appeared to be opposing at times, they helped show which nodes would be appearing in very close proximity, thus needing to be more distinct in color choice. Things like objective nodes would then appear at the end of a given spectrum to emit the same signal that the original color set emits indicating the “end” so to speak.

Additional constraints not present for plotting purposes came in the form of readability. Whereas using darker colors for graphing lines and shapes against a white background posed no issue when plotting, applying them to nodes that need to be read did. Not only did the nodes need to be readable,  but also their input fields/buttons. Though the option to dynamically adapt to white text was considered, for the time being we decided in favor of uniform black text for all nodes. This was accomplished by removing approximately the last quarter of the color set and making the remaining colors a few shades lighter.

The results

After very helpful feedback from the whole team and a few revisions, we reached the satisfying result that can be seen below.

In addition to these color sets, we’ve included a “pastel” set. In truth it’s just a lightened version of all the default colors, but we found this to be a nice option for those who have grown accustomed to the existing colors.

Looking forward

As of late, we’ve received an increasing number of requests from clients currently using Python and R for more integration between those products and Analytica. Albeit minor, matching styles is part of that process. Moving forward we’re looking towards extending these color styles to Analytica’s graphs, leading to a cohesive style across any software that might be utilized.

Everything said, the visual aspects of Analytica will continue to evolve as a result of both community feedback (yes, we read everything you send us!) and from continued efforts on our end (a simple matter of programming, no?). This is just the beginning. 

For more

Share now 

See also