CHAPTER 11
Beginner
Working with Colors, Themes, and Styles
Updated: May 18, 2026
5 min read
# CHAPTER 11
Working with Colors, Themes, and Styles
1. Chapter Introduction
Color is the most emotionally powerful element of data visualization. Misused, it confuses and misleads. Mastered, it guides attention, encodes meaning, and creates professional, accessible charts that communicate instantly.2. Color Palettes in Practice
python
3. Matplotlib Styles
python
4. Professional Color System
python
5. Common Mistakes
-
Rainbow colormaps for continuous data: Rainbow (
jet) has perceptual issues — the middle yellows look brighter than endpoints. Useviridis,plasma, orBluesinstead.
- Using color as the only difference: ~8% of men are color-blind. Always add shape, pattern, or label differentiation alongside color.
6. MCQs
Question 1
Sequential color palette is used for?
Question 2
Why avoid the jet (rainbow) colormap?
Question 3
plt.style.use('ggplot') applies?
Question 4
Colorblind-safe design rule?
Question 5
Diverging palette is best when?
Question 6
with plt.style.context(style): applies style?
Question 7
viridis advantage over jet?
Question 8
Qualitative palette is for?
Question 9
Brand color system improves?
Question 10
Tab10 provides?
7. Interview Questions
-
Q: Why is the
jetcolormap considered problematic in data visualization?
- Q: How do you make charts accessible for color-blind viewers?
8. Summary
Color encoding: sequential for magnitude, diverging for +/- data, qualitative for categories. Useviridis/plasma for continuous data (perceptually uniform). Apply plt.style.use() for consistent aesthetics. Build a brand color system. Always add non-color differentiators for accessibility. Never use rainbow (jet).
9. Next Chapter Recommendation
In Chapter 12: Subplots and Multi-Chart Layouts, we create dashboard-style multi-panel figures usingplt.subplots() and GridSpec.