Therefore, the best place to use colors is for encoding categories. Even in categorical cases, it is good to be careful to choose colors with different hue, saturation, and lightness so that it can be distinguishable even in grayscale.
One of the worst pairs of colors you can use is the Christmas colors — red and green — because people with colorblindness cannot distinguish them.
Gestalt principles describe "the various ways we tend to visually assemble individual objects into groups or 'unified wholes'". We, human beings, have been adapting to the natural environments and our cognitive system actively fill the gaps. Exploiting the principles can make the visualization easier to understand.
There are many illusions related to Gestalt principles and active gap-filling nature of human cognition. For instance,
E. Tufte argued that a good visualization is also a succinct, efficient visualization that presents lots of data with minimal 'ink'. He argued that we need to optimize the data-ink ratio, which is defined by the "proportion of a graphic's ink devoted to the non-redundant display of data-information". He re-worked several common visualizations according to this principle. One of the notable example that exemplify his approach is the Sparkline, which has the data-ink ratio of 1.
Of course, there are debates on this principle. For instance, Scott Bateman et al. argued that the 'chart junk' that doesn't contribute to the data-ink can increase the memorability of visualizations and can also help viewers to engage the visualization more.